by andrew » Fri Feb 10, 2023 3:08 pm
is it possible to write to more displays in one code?
You can do this by creating two instances of the library and then assigning a different I2C address to each instance. Here is an example of how to do it:
#include "SmartLCDI2C.h" //Include the SmartLCD I2C Library
#define I2C_ADD1 0x27 //I2C address of SmartLCD 1
#define I2C_ADD2 0x28 //I2C address of SmartLCD 2
// Create two instances of the library (SmartLCD1 & SmartLCD2)
// and assign them different addresses
// Initialise both instances of the library
// Clear both screens
// Print something to each screen
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.