C/C++ Question LCD1602BigNumbers Library Need Help

rwblinn

Well-Known Member
Licensed User
Longtime User
Hi,

build a small library to display big numbers on an LCD1602 using the LiquidCrystal library. The library is working fine in the Arduino IDE. In B4R wrapped and compiled OK, but when compiling a sample, receiving error:
B4X:
In file included from sketch\B4RDefines.h:25:0,
                 from sketch\B4RArduino.cpp:1:
rLCD1602BigNumbers.h:15: error: 'B4RLiquidCrystal' has not been declared
     void Initialize(B4RLiquidCrystal* lcd);

Sample code:
The library rLiquidCrystal v1.00 is used.
B4X:
Sub Process_Globals
    Public Serial1 As Serial
    Private lcd As LiquidCrystal
    Private bigNum As LCD1602BigNumbers
End Sub

Private Sub AppStart
    Serial1.Initialize(115200)
    lcd.Initialize(12,255,11, Array As Byte(5,4,3,2))
    lcd.Begin(16,2)
    lcd.DisplayOn = True
    bigNum.Initialize(lcd)
    bigNum.WriteBigNumber(9, 4)
End Sub

Any hints greatly appreciated?
 

Attachments

  • rLCD1602BigNumbers.zip
    3.6 KB · Views: 599

rwblinn

Well-Known Member
Licensed User
Longtime User
OK - done, now receiving error when compiling --- still very much in "B4R library wrapping learning mode" :(

B4X:
B4R version: 1.80
Parsing code.    (0.00s)
Compiling code.    (0.14s)
Building project    (0.10s)
Compiling & deploying Ino project (Arduino/Genuino Uno - COM9)    Error
Loading configuration...
Initializing packages...
Preparing boards...
Verifying...
sketch\rLCD1602BigNumbers.cpp: In member function 'void B4R::B4RLCD1602BigNumbers::Initialize(B4R::B4RLiquidCrystal*)':
rLCD1602BigNumbers.cpp:5: error: no matching function for call to 'LCD1602BigNumbers::LCD1602BigNumbers(B4R::B4RLiquidCrystal**)'
     bn = new (be) LCD1602BigNumbers(&lcd);
                                         ^
sketch\rLCD1602BigNumbers.cpp:5:41: note: candidates are:
In file included from sketch\rLCD1602BigNumbers.h:6:0,
                 from sketch\B4RDefines.h:25,
                 from sketch\rLCD1602BigNumbers.cpp:1:
sketch\LCD1602BigNumbers.h:17:5: note: LCD1602BigNumbers::LCD1602BigNumbers(LiquidCrystal*)
     LCD1602BigNumbers(LiquidCrystal*);
     ^
sketch\LCD1602BigNumbers.h:17:5: note:   no known conversion for argument 1 from 'B4R::B4RLiquidCrystal**' to 'LiquidCrystal*'
sketch\LCD1602BigNumbers.h:14:7: note: constexpr LCD1602BigNumbers::LCD1602BigNumbers(const LCD1602BigNumbers&)
class LCD1602BigNumbers
       ^
sketch\LCD1602BigNumbers.h:14:7: note:   no known conversion for argument 1 from 'B4R::B4RLiquidCrystal**' to 'const LCD1602BigNumbers&'
sketch\LCD1602BigNumbers.h:14:7: note: constexpr LCD1602BigNumbers::LCD1602BigNumbers(LCD1602BigNumbers&&)
sketch\LCD1602BigNumbers.h:14:7: note:   no known conversion for argument 1 from 'B4R::B4RLiquidCrystal**' to 'LCD1602BigNumbers&&'
exit status 1
 

rwblinn

Well-Known Member
Licensed User
Longtime User
Got it :) - good learning to better analyse compiler log. The lib is working - thanks for help!

upload_2017-1-31_9-46-18.png
 
Last edited:
Top