This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| en:iot-open:practical:hardware:rtu:esp32:scenarios:lcd [2025/07/30 15:44] – kivilands6 | en:iot-open:practical:hardware:rtu:esp32:scenarios:lcd [2025/07/30 15:46] (current) – [Prequisits] kivilands6 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== ESP32 LCD 16x2 ===== | ||
| + | This is an example of the lcd running, check the reference for more things to do: https:// | ||
| + | ===== Prequisits ==== | ||
| + | Platform.ini | ||
| + | < | ||
| + | lib_deps = adafruit/ | ||
| + | </ | ||
| + | ===== Example ==== | ||
| + | < | ||
| + | #include < | ||
| + | #include < | ||
| + | |||
| + | #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, | ||
| + | Serial.println(" | ||
| + | while(1); | ||
| + | } | ||
| + | Serial.println(" | ||
| + | |||
| + | // Print a message to the LCD. | ||
| + | lcd.print(" | ||
| + | } | ||
| + | void loop() { | ||
| + | lcd.setCursor(0, | ||
| + | // print the number of seconds since reset: | ||
| + | lcd.print(millis()/ | ||
| + | delay(1000); | ||
| + | } | ||
| + | </ | ||