tobeedelafuente

lcd.ino

Mar 30th, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.52 KB | None | 0 0
  1. #include <Wire.h>
  2. #include <LiquidCrystal_I2C.h>
  3.  
  4. LiquidCrystal_I2C lcd(0x20,20,4);
  5.  
  6. void setupLcd() {
  7.   lcd.init();
  8.   lcd.backlight();
  9.   lcd.clear();
  10. }
  11.  
  12. void displayLcdDetails(String line1, String line2, String line3, String line4, boolean shouldClear) {
  13.   if (shouldClear)  lcd.clear();
  14.   lcd.setCursor(0,0);
  15.   lcd.print(line1);
  16.   lcd.setCursor(0,1);
  17.   lcd.print(line2);
  18.   lcd.setCursor(0,2);
  19.   lcd.print(line3);
  20.   lcd.setCursor(0,3);
  21.   lcd.print(line4);
  22. }
  23.  
  24. void clearLcdDisplay() {
  25.   lcd.clear();
  26. }
Add Comment
Please, Sign In to add comment