Correcting variable declaration from byte to int

The original code has a bug. analogRead returns an int.
this change corrects the variable mismatch.