Last active
February 12, 2017 18:27
-
-
Save kestel/e84115c556d0555d700b3b15804b4361 to your computer and use it in GitHub Desktop.
Simple example for esp8266 with LCD 2004 screen by i2c
This file contains 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
// Library https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library | |
// Original from https://gist.github.com/bavensky/8cc772149df9e349014b | |
#include <Wire.h> | |
#include <LiquidCrystal_I2C.h> | |
LiquidCrystal_I2C lcd(0x27,20,4); | |
uint8_t heart[8] = {0x0,0xa,0x1f,0x1f,0xe,0x4,0x0}; | |
void setup() { | |
lcd.begin(); | |
lcd.backlight(); | |
lcd.createChar(1, heart); | |
} | |
void loop() { | |
lcd.home(); | |
lcd.print("Welcome to my world!"); | |
lcd.setCursor(2, 1); | |
lcd.write(byte(1)); | |
lcd.print(" ESP8266 with"); | |
lcd.setCursor(0, 2); | |
lcd.print(" LiquidCrystal I2C "); | |
lcd.setCursor(0, 3); | |
lcd.print("4th line"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment