Table of Contents

ESP32 LCD 16x2

This is an example of the lcd running, check the reference for more things to do: https://github.com/adafruit/Adafruit_LiquidCrystal

Prequisits

Platform.ini

lib_deps = adafruit/Adafruit LiquidCrystal@^2.0.2

Example

#include <Arduino.h>
#include <Adafruit_LiquidCrystal.h>

#define LCD_RS 48
#define LCD_ENABLE 47
#define LCD_D4 34
#define LCD_D5 33
#define LCD_D6 26
#define LCD_D7 21

static Adafruit_LiquidCrystal lcd(LCD_RS, LCD_ENABLE, LCD_D4, LCD_D5, LCD_D6, LCD_D7);

void setup() {
  if (!lcd.begin(16, 2)) {
    Serial.println("Could not init LCD");
    while(1);
  }
  Serial.println("LCD ready.");

  // Print a message to the LCD.
  lcd.print("IOT-OPEN");
}
void loop() {
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis()/1000);
  delay(1000);
}
en/iot-open/practical/hardware/rtu/esp32/scenarios/lcd.txt · Last modified: 2025/07/30 12:46 by kivilands6
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0