/* II2C 1602 Variables Display Both LCD Lines Values 0 through 20 Written August 8, 2020 Programmer: R Jordan Keindler */ #include LiquidCrystal_I2C lcd(0x27, 16, 2); // set the LCD address to 0x27 for a 16 chars and 2 line display int delay1 = 500; void setup() { lcd.init(); // initialize the lcd lcd.backlight(); // Turn backlight On } void loop() { lcd.clear(); lcd.setCursor(0, 0); // Set cursor at position zero(0) on first line of 1602 LCD for (int i = 0; i <= 12; i++) { lcd.print(i); // Display succesive values of variable i delay(delay1); // Delay delay1 after each display of i } lcd.setCursor(0, 1); // Set cursor at position zero(0) on second line of 1602 LCD for (int j = 13; j <= 20; j++) { lcd.print(j); // Display succesive values of variable j delay(delay1); // Delay delay1 after each display of j } }