Class: SparkfunLcd
- Inherits:
-
ArduinoSketch
- Object
- ArduinoSketch
- SparkfunLcd
- Defined in:
- lib/examples/sparkfun_lcd.rb
Instance Attribute Summary
Attributes inherited from ArduinoSketch
Instance Method Summary collapse
- #check_buttons ⇒ Object
-
#loop ⇒ Object
serial_begin # not necessary when using :device => :sf_lcd or :pa_lcd.
-
#say_hello ⇒ Object
need a bit.
- #say_ruby ⇒ Object
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
40 41 42 43 44 45 46 |
# File 'lib/examples/sparkfun_lcd.rb', line 40 def read_and_toggle , led say_hello if read_input say_ruby if read_input end |
#loop ⇒ Object
serial_begin # not necessary when using :device => :sf_lcd or :pa_lcd
16 17 18 |
# File 'lib/examples/sparkfun_lcd.rb', line 16 def loop end |
#say_hello ⇒ Object
need a bit
23 24 25 26 27 28 29 |
# File 'lib/examples/sparkfun_lcd.rb', line 23 def say_hello my_lcd.setxy 0,0 # line 0, col 0 my_lcd.print "All your base " my_lcd.setxy 0,1 # line 1, col 0 my_lcd.print "are belong to us" end |
#say_ruby ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/examples/sparkfun_lcd.rb', line 31 def say_ruby my_lcd.setxy 0,0 # line 0, col 0 my_lcd.print " Ruby + Arduino " my_lcd.setxy 0,1 # line 1, col 0 my_lcd.print " RAD 0.2.4+ " # un comment to change display startup #myLCD.setcmd 0x7C, 10 end |