Post
by RogerL » Sun Feb 09, 2025 8:39 pm
Hi Andrew. I am trying to use one of the HCMODU0262 displays in I2C mode with an ESP32 C3 board. I realise that the display is 5V, so I was planning to use level shifters to boost the I2C signals. However, when I try and compile the simple Hello World! code provided in the forum topic for the display, I get errors:
C:\Data\Roger_Hobby\Control_Systems\Arduino\libraries\SmartLCD\SmartLCDI2C.cpp:164:6: error: default argument given for parameter 2 of 'void SmartLCD::Print(float, uint8_t)' [-fpermissive]
164 | void SmartLCD::Print(float val, uint8_t dp = 0)
| ^~~~~~~~
In file included from C:\Data\Roger_Hobby\Control_Systems\Arduino\libraries\SmartLCD\SmartLCDI2C.cpp:44:
C:\Data\Roger_Hobby\Control_Systems\Arduino\libraries\SmartLCD\SmartLCDI2C.h:96:14: note: previous specification in 'void SmartLCD::Print(float, uint8_t)' here
96 | void Print(float val, uint8_t dp = 0);
| ^~~~~
exit status 1
Error compiling for board XIAO_ESP32C3.
I also tried compiling the code for an Arduino Uno and that works fine, but it doesn't compile for a Lolin D32. I realise that the library was written for AVR Arduinos, but can you suggest a fix for these ESP32 compilation problems? Or would I be better off using a different display in this case?