fixed bug in the Arduino Sensor method