Created
June 22, 2016 20:16
-
-
Save LosantGists/e7278a6281fa863c807336f6304805d3 to your computer and use it in GitHub Desktop.
Connect LCD Display to ESP8266 NodeMCU
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <LiquidCrystal_I2C.h> | |
| // Construct an LCD object and pass it the | |
| // I2C address, width (in characters) and | |
| // height (in characters). Depending on the | |
| // Actual device, the IC2 address may change. | |
| LiquidCrystal_I2C lcd(0x3F, 16, 2); | |
| void setup() { | |
| // The begin call takes the width and height. This | |
| // Should match the number provided to the constructor. | |
| lcd.begin(16,2); | |
| lcd.init(); | |
| // Turn on the backlight. | |
| lcd.backlight(); | |
| // Move the cursor characters to the right and | |
| // zero characters down (line 1). | |
| lcd.setCursor(5, 0); | |
| // Print HELLO to the screen, starting at 5,0. | |
| lcd.print("HELLO"); | |
| // Move the cursor to the next line and print | |
| // WORLD. | |
| lcd.setCursor(5, 1); | |
| lcd.print("WORLD"); | |
| } | |
| void loop() { | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't understand how I can not write in my lcd, have everything so well connected and copy the same code , although I must say I had to add a library (Wire.h) and I commented (lcd.begin(16,2);). In addition, I have a warning (WARNING: library LiquidCrystal I2C claims to run on [avr] architecture(s) and may be incompatible with your current board which runs on [esp8266] architecture(s).). Helpme please.