Sha256: e9ef836b5344ed49c6db7e48a141058ebde5e1602a16a6a92b5a167e055029e1
Contents?: true
Size: 547 Bytes
Versions: 25
Compression:
Stored size: 547 Bytes
Contents
class ServoButtons < ArduinoSketch # original syntax input_pin 6, :as => :button_one, :latch => :off # preferred syntax input_pin 7, :as => :button_two, :device => :button input_pin 8, :as => :button_three, :device => :button output_pin 13, :as => :led output_pin 2, :as => :my_servo, :device => :servo def loop check_buttons servo_refresh end def check_buttons read_and_toggle button_one, led my_servo.position 180 if read_input button_two my_servo.position 60 if read_input button_three end end
Version data entries
25 entries across 25 versions & 4 rubygems