// https://microcontrollerslab.com/esp32-pinout-use-gpio-pins/
// https://github.com/espressif/arduino-esp32
// https://github.com/espressif/arduino-esp32/tree/master/cores/esp32
// https://github.com/johnrickman/LiquidCrystal_I2C
//--------------------------------------------------
// Includes:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
//--------------------------------------------------
// Globals:
// LCD Objekt Nr 1 erzeugen
// - I2C Adresse: 0x27
// - Zeichen pro Zeile: 16
// - Anzahl Zeilen: 2
LiquidCrystal_I2C myLCD1 = LiquidCrystal_I2C(0x27, 16, 2);
// LCD Objekt Nr 2 erzeugen
// - I2C Adresse: 0x28
// - Zeichen pro Zeile: 16
// - Anzahl Zeilen: 2
LiquidCrystal_I2C myLCD2 = LiquidCrystal_I2C(0x28, 16, 2);
uint32_t gCnt1 = 0;
uint32_t gCnt2 = 0;
//--------------------------------------------------
void setup() {
// Init USART:
Serial.begin(115200);
// Init LCD Nr 1:
myLCD1.init();
myLCD1.backlight();
// Init LCD Nr 2:
myLCD2.init();
myLCD2.backlight();
}
//--------------------------------------------------
void loop() {
// Write LCD Nr 1
myLCD1.setCursor(0, 0);
myLCD1.printf("%lu", gCnt1);
// Write LCD Nr 2
myLCD2.setCursor(0, 0);
myLCD2.printf("%lu", gCnt2);
// Write USART
Serial.printf("%lu, %lu\n", gCnt1, gCnt2);
// Inkrement Counter
gCnt1 = gCnt1 + 1;
gCnt2 = gCnt2 + 2;
// Wait 500ms
delay(500);
}