Advertisement
Rhavecilla

i2c 20x4 LCD Template

Jul 30th, 2021
921
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. #include <Wire.h>
  2. #include <LiquidCrystal_I2C.h>
  3.  
  4.  
  5. // Object creation.
  6. LiquidCrystal_I2C lcd(0x27,20,4);   // LCD class.
  7.  
  8.  
  9. void setup(){
  10.  
  11.   lcd.init();
  12.   lcd.backlight();
  13.   lcd.clear();
  14.                                //          1            
  15.                                //01234567890123456789
  16.   lcd.setCursor(0,0); lcd.print("Line               1");
  17.   lcd.setCursor(0,1); lcd.print("Line               2");
  18.   lcd.setCursor(0,2); lcd.print("Line               3");
  19.   lcd.setCursor(0,3); lcd.print("Line               4");
  20. }
  21.  
  22.  
  23. void loop(void){
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement