Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- To interface a 16x2 LCD with ESP32, you can use the LiquidCrystal_I2C library. Here's a simple example:
- Assuming the following connection:
- SDA => GPIO21
- SCL => GPIO22
- */
- #include <Wire.h>
- #include <LiquidCrystal_I2C.h>
- // Set the LCD address to 0x27 for a 16 chars and 2 line display
- LiquidCrystal_I2C lcd(0x27, 16, 2);
- void setup()
- {
- lcd.begin(16,2); // initialize the lcd
- lcd.backlight();
- lcd.setCursor(0,0); // go to the top left corner
- lcd.print("Hello, world!");
- lcd.setCursor(0,1); // go to the 2nd line
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement