Corrected byte to int

the original code has a bug. AnalogRead returns an int. This change
corrects hte variable mismatch