Advertisement
sspence65

ESP8266 I2C LCD

Mar 31st, 2018
6,552
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. #include <LiquidCrystal_I2C.h>
  2.  
  3.  
  4.  
  5. // Construct an LCD object and pass it the
  6. // I2C address, width (in characters) and
  7. // height (in characters). Depending on the
  8. // Actual device, the IC2 address may change.
  9. LiquidCrystal_I2C lcd(0x27, 20, 4);
  10.  
  11. void setup() {
  12.  
  13.  
  14. lcd.init();
  15.  
  16. // Turn on the backlight.
  17. lcd.backlight();
  18.  
  19. // Move the cursor 5 characters to the right and
  20. // zero characters down (line 1).
  21. lcd.setCursor(5, 0);
  22.  
  23. // Print HELLO to the screen, starting at 5,0.
  24. lcd.print("HELLO");
  25.  
  26. // Move the cursor to the next line and print
  27. // WORLD.
  28. lcd.setCursor(5, 1);
  29. lcd.print("WORLD");
  30. }
  31.  
  32. void loop() {
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement