diff --git a/lib/arduino_firmata/const.rb b/lib/arduino_firmata/const.rb index 5558e04..6778e76 100644 --- a/lib/arduino_firmata/const.rb +++ b/lib/arduino_firmata/const.rb @@ -18,15 +18,16 @@ class Status OPEN = 1 end - INPUT = 0 - OUTPUT = 1 - ANALOG = 2 - PWM = 3 - SERVO = 4 - SHIFT = 5 - I2C = 6 - LOW = 0 - HIGH = 1 + INPUT = 0 + OUTPUT = 1 + ANALOG = 2 + PWM = 3 + SERVO = 4 + SHIFT = 5 + I2C = 6 + INPUT_PULLUP = 11 + LOW = 0 + HIGH = 1 MAX_DATA_BYTES = 32 DIGITAL_MESSAGE = 0x90 # send data for a digital port diff --git a/test/test_arduino_firmata.rb b/test/test_arduino_firmata.rb index 1357174..45f05a7 100644 --- a/test/test_arduino_firmata.rb +++ b/test/test_arduino_firmata.rb @@ -51,7 +51,11 @@ def test_servo_write def test_pin_mode 0.upto(13).each do |pin| - mode = [ArduinoFirmata::OUTPUT, ArduinoFirmata::INPUT].sample + mode = [ + ArduinoFirmata::OUTPUT, + ArduinoFirmata::INPUT, + ArduinoFirmata::INPUT_PULLUP + ].sample assert @arduino.pin_mode(pin, mode) == mode end end