NodeMCU 16X2 LCD code problem
Posted: Fri Jan 08, 2016 6:38 pm
Currently using the NodeMCU which uses the ESP8266 chip to send data from a sensor to a server, but I also want to see the information through an LCD which is connected to the node MCU, the only thing I found to a tutorial code is from this page
http://thaiopensource.org/%E0%B8%A1%E0%B8%B2%E0%B9%80%E0%B8%A5%E0%B9%88%E0%B8%99-esp8266-%E0%B8%81%E0%B8%B1%E0%B8%9A%E0%B8%88%E0%B8%AD-lcd-%E0%B8%81%E0%B8%B1%E0%B8%99/
Unfortunately I donĀ“t know of that language, so I checked the link to the library and the code provided there, but it tells me there's an invalid connection in the arduino IDE, I think this is caused by the enabler having the same name as the library. Can someone help me confirm this? And if you do, Can you tell me how to fix it?
http://thaiopensource.org/%E0%B8%A1%E0%B8%B2%E0%B9%80%E0%B8%A5%E0%B9%88%E0%B8%99-esp8266-%E0%B8%81%E0%B8%B1%E0%B8%9A%E0%B8%88%E0%B8%AD-lcd-%E0%B8%81%E0%B8%B1%E0%B8%99/
Unfortunately I donĀ“t know of that language, so I checked the link to the library and the code provided there, but it tells me there's an invalid connection in the arduino IDE, I think this is caused by the enabler having the same name as the library. Can someone help me confirm this? And if you do, Can you tell me how to fix it?
Code: Select all
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Set the LCD address to 0x27 for a 16 chars and 2 line display
// Arduino UNO => PIN 4 = SCL, PIN 5 = SDA
// NodeMCU Dev Kit => D1 = SCL, D2 = SDA
#define SCL D3
#define SDA D4
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup()
{
// initialize the LCD
lcd.begin();
// Turn on the blacklight and print a message.
lcd.backlight();
lcd.print("Hello LCD Line 1");
lcd.setCursor(0, 1);
lcd.print("Hello LCD Line 2");
lcd.setCursor(0, 2);
lcd.print("Hello LCD Line 3");
lcd.setCursor(0, 3);
lcd.print("Hello LCD Line 4");
}
void loop()
{
// Do nothing here...
}