Requirements:
1x Wemos D1 mini
1x LCD 1602 with Backpack (PCF8574T i2c)
4x Female to Female Cable
1x Bi-directional i2c logic converter
Connections (without logic converter):
Wemos 5V to VCC
GND to GND
D1 to SCL
D2 to SDA
Connections with logic converter:
TODO (After I order a logic converter)
CAUTION: You need to use a logic level converter for i2c as the 5V VCC is being fed to the SDA and SCL pins, so it may fry the Wemos D1 mini.
I do not have a logic converter and just used the SDA and SCL with the VCC.
3V3 does not work for the LCD, the backlight is dim and no text appears.
GNU+Linux OS with Arduino IDE and git
Open your Terminal window:
$ cd Arduino/libraries
$ git clone https://github.com/marcoschwartz/LiquidCrystal_I2C
Cloning into 'LiquidCrystal_I2C'...
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 94 (delta 2), reused 0 (delta 0), pack-reused 88
Unpacking objects: 100% (94/94), done.
Open your Arduino IDE
Create a new sketch and input the following:
#include Wire.h
#include LiquidCrystal_I2C.h
LiquidCrystal_I2C lcd(0x27,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("11/23/2018 WEMOS");
lcd.setCursor(0,1);
lcd.print("I2C LCD R1BNC");
}
void loop()
{
}
0x27 worked for my Wemos D1 mini, if you are using a NodeMCU then change the 0x27 to 0x3F.
Connect your wemos d1 mini microusb to the PC and Upload the code.
TODO: the NONOS-SDK and RTOS implementation
Youtube video (unboxing): https://youtu.be/37wVpfi3kw8