edited sensorPin assignment to reading