-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot use two different LCD with PCF8574 in the same arduino sketch #14
Comments
Just create them manually instead if you need more than one, without using the macro. If you
The macros is simply a convenience for the easy cases. |
Hi, I have the same issue, needing to display on two displays simultaneously, however I don't understand what I need to do...
and referring to either DisplayLCD1 or DisplayLCD2: eg. DisplayLCD1.print("hello over i2c!"); I suspect I need to do something with the: but I cannot work out what it is I need to change! Any help very much appreciated! |
You literally declare the variable yourself instead of using the macro. The code just showed what the macro actually does. |
Hi
if i try to initialize two LCD with differents addresses on the same bus i get a compilation error
"
LiquidCrystalI2C_RS_EN(lcd0, 0x27, false)
LiquidCrystalI2C_RS_EN(lcd1, 0x26, false)
"
looks like something in macro expansion went wrong because "macro_backlight_tc" seems to have been defined twice imho
"
In file included from /tmp/.arduinoIDE-unsaved20221019-3301-1y9wb1.lcm1wi/HelloI2c/HelloI2c.ino:27:
/home/alban/Arduino/libraries/LiquidCrystalIO/src/LiquidCrystalIO.h:397:10: error: conflicting declaration 'auto macro_backlight_tc'
397 | auto macro_backlight_tc = (backlightInv) ? LiquidCrystal::BACKLIGHT_INVERTED : LiquidCrystal::BACKLIGHT_NORMAL;
| ^~~~~~~~~~~~~~~~~~
/tmp/.arduinoIDE-unsaved20221019-3301-1y9wb1.lcm1wi/HelloI2c/HelloI2c.ino:40:1: note: in expansion of macro 'LiquidCrystalI2C_RS_EN'
40 | LiquidCrystalI2C_RS_EN(lcd1, 0x26, false)
| ^~~~~~~~~~~~~~~~~~~~~~
/home/alban/Arduino/libraries/LiquidCrystalIO/src/LiquidCrystalIO.h:397:10: note: previous declaration as 'LiquidCrystal::BackLightPinMode macro_backlight_tc'
397 | auto macro_backlight_tc = (backlightInv) ? LiquidCrystal::BACKLIGHT_INVERTED : LiquidCrystal::BACKLIGHT_NORMAL;
| ^~~~~~~~~~~~~~~~~~
/tmp/.arduinoIDE-unsaved20221019-3301-1y9wb1.lcm1wi/HelloI2c/HelloI2c.ino:39:1: note: in expansion of macro 'LiquidCrystalI2C_RS_EN'
39 | LiquidCrystalI2C_RS_EN(lcd0, 0x27, false)
| ^~~~~~~~~~~~~~~~~~~~~~
exit status 1
Compilation error: exit status 1
"
arduino IDE v2.0.2
raspberrypi pico board
LiquidCrystalIO v 1.4.3
best regards,
Alban
The text was updated successfully, but these errors were encountered: