// https://wokwi.com/projects/359323056854506497
# include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 10, 9, 8, 7);
LiquidCrystal lcdToo(A0, A1, A2, A3, A4, A5);
void setup() {
lcd.begin(16, 2);
lcdToo.begin(16, 2);
// you can now interact with the LCDs, e.g.:
// lcd.print("Hello World!");
// lcdToo.print("GOOD BYE!");
function(&lcd, "Hello There!");
function(&lcdToo, "Goodbye.");
}
void loop() {
}
void function(LiquidCrystal *theDevice, char *msg)
{
// theDevice->print(msg); // or
(*theDevice).print(msg);
}
/*
LiquidCrystal lcdArray[2] = {
{12, 11, 10, 9, 8, 7},
{A0, A1, A2, A3, A4, A5},
};
void setup() {
lcdArray[0].begin(16, 2);
lcdArray[1].begin(16, 2);
// you can now interact with the LCD, e.g.:
// lcd.print("Hello World!");
// lcdToo.print("GOOD BYE!");
function(&lcdArray[0], "Hello There!");
function(&lcdArray[1], "Goodbye.");
}
void loop() {
// ...
}
void function(LiquidCrystal *theDevice, char *msg)
{
// theDevice->print(msg); // or
(*theDevice).print(msg);
}
*/
/*
LiquidCrystal lcd(12, 11, 10, 9, 8, 7);
LiquidCrystal lcdToo(A0, A1, A2, A3, A4, A5);
void setup() {
lcd.begin(16, 2);
lcdToo.begin(16, 2);
// you can now interact with the LCD, e.g.:
// lcd.print("Hello World!");
// lcdToo.print("GOOD BYE!");
function(&lcd, "Hello There!");
function(&lcdToo, "Goodbye.");
}
void loop() {
// ...
}
void function(LiquidCrystal *theDevice, char *msg)
{
// theDevice->print(msg); // or
(*theDevice).print(msg);
}
*/
// LCD1602 to Arduino Uno connection example
/*
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 10, 9, 8, 7);
LiquidCrystal lcdToo(A0, A1, A2, A3, A4, A5);
void setup() {
lcd.begin(16, 2);
lcdToo.begin(16, 2);
// you can now interact with the LCD, e.g.:
// lcd.print("Hello World!");
// lcdToo.print("GOOD BYE!");
function(&lcd, "Hello There!");
function(&lcdToo, "Goodbye.");
}
void loop() {
// ...
}
void function(LiquidCrystal *theDevice, char *msg)
{
(*theDevice).print(msg);
}
*/