corrected byte to int

The original code had a bug. analogRead returns an int. Corrected the
variable mismatch.