Class: HysteresisDuel
- Inherits:
-
ArduinoSketch
- Object
- ArduinoSketch
- HysteresisDuel
- Defined in:
- lib/examples/hysteresis_duel.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
#loop ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/examples/hysteresis_duel.rb', line 24 def loop my_lcd.setxy 0,0, "direct" my_lcd.setxy 0,1, "one: " my_lcd.print analogRead sensor_one my_lcd.print " two: " my_lcd.print analogRead sensor_two my_lcd.setxy 0,2, "with hysteresis" my_lcd.setxy 0,3, "one: " my_lcd.print sensor_one.with_hyst 4 my_lcd.print " two: " my_lcd.print sensor_two.with_hyst 4 delay 230 end |
#setup ⇒ Object
17 18 19 20 21 22 |
# File 'lib/examples/hysteresis_duel.rb', line 17 def setup delay 1000 my_lcd.setxy 0,0, "hysteresis duel" delay 5000 my_lcd.clearscr end |