#Region Project Attributes
#AutoFlushLogs: True
#CheckArrayBounds: True
#StackBufferSize: 300
#End Region
Sub Process_Globals
Public Serial1 As Serial
Private lcd As LiquidCrystal
Private gd As Glyphduino
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
' Init the LCD: RS,RW,EN,Data(4)
lcd.Initialize(8,255,9, Array As Byte(4,5,6,7))
lcd.Begin(16,2)
lcd.DisplayOn = True
' Init the bignum with lcd display
lcd.Clear
gd.Initialize(lcd)
'register the first 4 glyphs
gd.registerGlyph(0, gd.GLYPHDUINO_ARROW_NE)
gd.registerGlyph(1, gd.GLYPHDUINO_ARROW_SW)
gd.registerGlyph(2, gd.GLYPHDUINO_SPEAKER)
gd.registerGlyph(3, gd.GLYPHDUINO_HEART)
'set cusrsor position to 0,0. Glyphs will be written to current position of the cursor
lcd.SetCursor(0,0)
gd.printGlyphAtCursorPosition(gd.GLYPHDUINO_ARROW_NE)
gd.printGlyphAtCursorPosition(gd.GLYPHDUINO_ARROW_SW)
gd.printGlyphAtCursorPosition(gd.GLYPHDUINO_SPEAKER)
gd.printGlyphAtCursorPosition(gd.GLYPHDUINO_HEART)
'register last 4 glyphs
gd.registerGlyph(4, gd.GLYPHDUINO_PI)
gd.registerGlyph(5, gd.GLYPHDUINO_BELL)
gd.registerGlyph(6, gd.GLYPHDUINO_BATTERY_4_BAR)
gd.registerGlyph(7, gd.GLYPHDUINO_LOCK)
'print specified glyph to specified column and row
gd.printGlyphAtSpecifiedPosition(gd.GLYPHDUINO_PI, 1, 2)
gd.printGlyphAtSpecifiedPosition(gd.GLYPHDUINO_BELL, 15, 0)
gd.printGlyphAtSpecifiedPosition(gd.GLYPHDUINO_BATTERY_4_BAR, 8, 1)
gd.printGlyphAtSpecifiedPosition(gd.GLYPHDUINO_LOCK, 10, 0)
End Sub