Difference between revisions of "WeMOS: D1 R1 mini LCD I2C Hello World"

From OnnoWiki
Jump to navigation Jump to search
(Created page with "center|400px|thumb Wemos Mini LCD1602 GND GND 3v3 VCC D2 SDA D1 SCL Code #include <Wire.h> #includ...")
 
Line 8: Line 8:
  
 
Code
 
Code
 +
 +
 +
/*
 +
  Wemos Mini LCD1602
 +
  GND         GND
 +
  3v3         VCC
 +
  D2         SDA
 +
  D1         SCL
 +
*/
  
 
  #include <Wire.h>
 
  #include <Wire.h>

Revision as of 18:35, 21 March 2023

Wemos-and-i2c-lcd bb.webp
Wemos Mini	LCD1602
GND	        GND
3v3	        VCC
D2	        SDA
D1	        SCL

Code


/*
  Wemos Mini	LCD1602
  GND	        GND
  3v3	        VCC
  D2	        SDA
  D1	        SCL
*/
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
 
LiquidCrystal_I2C lcd(0x3F,16,2); // set the LCD address to 0x3F for 
a 16 chars and 2 line display
 
void setup()
{
lcd.init(); // initialize the lcd
lcd.init();
// Print a message to the LCD.
lcd.backlight();
lcd.setCursor(0,0);
lcd.print("Hello world");
lcd.setCursor(1,0);
lcd.print("ESP32 I2C LCD");
}

void loop()
{
}