class SparkfunLcd

Public Instance Methods

check_buttons() click to toggle source
# File lib/examples/sparkfun_lcd.rb, line 40
def check_buttons
      read_and_toggle button_one, led
      say_hello if read_input button_two
      say_ruby if read_input button_three
      
      
end
loop() click to toggle source

serial_begin # not necessary when using :device => :sf_lcd or :pa_lcd

# File lib/examples/sparkfun_lcd.rb, line 16
def loop
 check_buttons
end
say_hello() click to toggle source

need a bit

# 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() click to toggle source
# 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