Changed datatype to integer for Arduino analog pin