Class: ServoButtons
- Inherits:
-
ArduinoSketch
- Object
- ArduinoSketch
- ServoButtons
- Defined in:
- lib/examples/servo_buttons.rb
Instance Attribute Summary
Attributes inherited from ArduinoSketch
Instance Method Summary collapse
Methods inherited from ArduinoSketch
#add, add_to_setup, #array, #assembler, #comment_box, #compose_setup, #define, #delay, #digitalWrite, #formatted_print, #initialize, #input_pin, #input_pins, output_pin, #output_pin, post_process_ruby_to_c_methods, pre_process, #serial_begin
Methods included from ExternalVariableProcessing
#c_type, #check_variable_type, #post_process_arrays, #post_process_vars, #pre_process_vars, #process_external_vars, #translate_variables
Constructor Details
This class inherits a constructor from ArduinoSketch
Instance Method Details
#check_buttons ⇒ Object
17 18 19 20 21 |
# File 'lib/examples/servo_buttons.rb', line 17 def read_and_toggle , led my_servo.position 180 if read_input my_servo.position 60 if read_input end |
#loop ⇒ Object
12 13 14 15 |
# File 'lib/examples/servo_buttons.rb', line 12 def loop servo_refresh end |