Using LCD1602-I2C with D1 Mini, NodeMCU ESP8266 and Arduino
Using LCD with Wemos D1 Mini ESP8266 with Arduino
This code is for video on how use LCD1602-I2C or LCD2004-I2C display with Arduino.
Boards manager link:https://arduino.esp8266.com/stable/package_esp8266com_index.json
Resources for this sketch
- Wemos.cc official Websit of D1 Mini
- ESP8266 Arduino Driver on Gethub
- ESP8266 Datasheet (pdf)
- LCD1602 Library (from Robojax.com)
- LCD1602 Library (from GetHub)
- I2C Scanner code
- I2C Scanner
- Introduction to LCD1602-I2C with code
- Robojax Arduino Course on Udemy
- Get Early Access to my videos via Patreon
Arduino code for D1 Mini with LCD-1602-I2C or LCD2004-I2C
/*
* Using LCD screen with wemos D1 Mini and Arduino
* Written by Ahmad Shamshiri on Aug 01, 2019
* at 17:42 in Ajax, Ontario, Canada
* for Robojax.com
* Watch video instruction for this code: https://youtu.be/mRAgS-CdURU
*
Get this code and other Arduino codes from Robojax.com
If you found this tutorial helpful, please support me so I can continue creating
content like this. You can support me on Patreon http://robojax.com/L/?id=63
or make donation using PayPal http://robojax.com/L/?id=64
*/
// start of settings for LCD1602 with I2C
#include <LiquidCrystal_I2C.h>
// Set the LCD address to 0x27 for a 16 chars and 2 line display
LiquidCrystal_I2C lcd(0x3F, 16, 2);
// end of settings for LCD1602 with I2C
int count =0;
void setup() {
lcd.begin();
lcd.backlight();
lcd.print("Robojax D1 Mini");
lcd.setCursor(0,1);
lcd.print("Demo");
delay(2000);
}
void loop() {
// Robojax D1 Mini LCD-1602-I2C
lcd.clear();// clear previous values from screen
lcd.print("Robojax D1 Mini");
lcd.setCursor(0,1);
lcd.print("Counting:");
lcd.setCursor(11,1);
lcd.print(count);
count++;
delay(200);
}