Change int to uint8_t. Let declare variables consistent