class ServoButtons

Public Instance Methods

check_buttons() click to toggle source
# File lib/examples/servo_buttons.rb, line 17
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
loop() click to toggle source
# File lib/examples/servo_buttons.rb, line 12
def loop
 check_buttons
 servo_refresh 
end