Class: ConfigurePaLcdBoot
- Inherits:
-
ArduinoSketch
- Object
- ArduinoSketch
- ConfigurePaLcdBoot
- Defined in:
- lib/examples/configure_pa_lcd_boot.rb
Instance Attribute Summary
Attributes inherited from ArduinoSketch
Instance Method Summary collapse
-
#change_boot_to_custom ⇒ Object
“?S0 for blank screen ?S1 for configuration settings ?S2 for custom text screen.
- #loop ⇒ Object
-
#set_cursor ⇒ Object
?c0 for no cursor ?c2 for non blinking cursor ?c3 for blinking cursor.
-
#set_custom_screen ⇒ Object
assumes 4 x 20 screen maintain 20 characters after ?Cn wny delays? the controller needs them to give it enough time to write 20 bytes to internl EEPROM.
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
#change_boot_to_custom ⇒ Object
“?S0 for blank screen ?S1 for configuration settings ?S2 for custom text screen
80 81 82 83 84 85 86 87 88 |
# File 'lib/examples/configure_pa_lcd_boot.rb', line 80 def change_boot_to_custom my_lcd.clearscr my_lcd.print "Changing to " my_lcd.setxy 0,1 my_lcd.print "custom boot screen. " my_lcd.setxy 0,3 my_lcd.print "Reboot to view... " my_lcd.print("?S2") end |
#loop ⇒ Object
41 42 43 44 45 |
# File 'lib/examples/configure_pa_lcd_boot.rb', line 41 def loop set_cursor if .read_input set_custom_screen if .read_input change_boot_to_custom if .read_input end |
#set_cursor ⇒ Object
?c0 for no cursor ?c2 for non blinking cursor ?c3 for blinking cursor
66 67 68 69 70 71 72 73 74 75 |
# File 'lib/examples/configure_pa_lcd_boot.rb', line 66 def set_cursor my_lcd.clearscr my_lcd.print "Changing to " my_lcd.setxy 0,1 my_lcd.print "no cursor. " my_lcd.setxy 0,3 my_lcd.print "Reboot to view... " my_lcd.print("?c0") end |
#set_custom_screen ⇒ Object
assumes 4 x 20 screen maintain 20 characters after ?Cn wny delays? the controller needs them to give it enough time to write 20 bytes to internl EEPROM
51 52 53 54 55 56 57 58 59 60 |
# File 'lib/examples/configure_pa_lcd_boot.rb', line 51 def set_custom_screen my_lcd.clearscr my_lcd.print "?C0 RAD & Arduino " delay 400 my_lcd.print "?C1 Development " delay 400 my_lcd.print "?C2 " delay 400 my_lcd.print "?C3 v0.3.0 " end |