B4R Library rLCD1602BigNumbers - Display Big Numbers

Library to display up to 4 Big Numbers on a LCD1602.
Each number (0 - 9) uses 3 columns and 2 rows.
Notes
  • B4R core library rLiquidCrystal is used.
  • Library file LCD1602BigNumbers.cpp is well documented - enables to easy enhance the library.
  • Thanks to @Erel for providing guidance on referencing the rLiquidCrystal objects.

upload_2017-1-31_9-46-18-png.52476


Example
B4X:
Sub Process_Globals
    Public Serial1 As Serial
    Private lcd As LiquidCrystal
    Private bigNum As LCD1602BigNumbers
End Sub

Private Sub AppStart
    Serial1.Initialize(115200)
    ' Init the LCD: RS,RW,EN,Data(4)
    lcd.Initialize(12,255,11, Array As Byte(5,4,3,2))
    lcd.Begin(16,2)
    lcd.DisplayOn = True
    ' Init the bignum with lcd display
    bigNum.Initialize(lcd)
    ' Write 1234
    bigNum.WriteBigNumber(1, 0)
    bigNum.WriteBigNumber(2, 4)
    bigNum.WriteBigNumber(3, 8)
    bigNum.WriteBigNumber(4, 12)
    Delay(2000)
    lcd.Clear
    ' Write 12:34 (time format)
    bigNum.WriteBigNumber(1, 0)
    bigNum.WriteBigNumber(2, 4)
    lcd.SetCursor(7,0)
    lcd.Write(".")
    lcd.SetCursor(7,1)
    lcd.Write(".")
    bigNum.WriteBigNumber(3, 8)
    bigNum.WriteBigNumber(4, 12)
End Sub
 

Attachments

  • rLCD1602BigNumbers.zip
    3.8 KB · Views: 344
Top