Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Wire.h>
- #include <LiquidCrystal_I2C.h>
- LiquidCrystal_I2C lcd(0x20,20,4);
- void setupLcd() {
- lcd.init();
- lcd.backlight();
- lcd.clear();
- }
- void displayLcdDetails(String line1, String line2, String line3, String line4, boolean shouldClear) {
- if (shouldClear) lcd.clear();
- lcd.setCursor(0,0);
- lcd.print(line1);
- lcd.setCursor(0,1);
- lcd.print(line2);
- lcd.setCursor(0,2);
- lcd.print(line3);
- lcd.setCursor(0,3);
- lcd.print(line4);
- }
- void clearLcdDisplay() {
- lcd.clear();
- }
Add Comment
Please, Sign In to add comment