#include <LiquidCrystal_PCF8574.h>
#include <Wire.h>
//initialize the liquid crystal library
//the first parameter is the address
LiquidCrystal_PCF8574 lcd(0x27);
bool runComplete = false;
void setup() {
//initialize lcd screen
lcd.begin(16, 2);
// turn on the backlight
lcd.setBacklight(255);
}
void loop() {
// put your main code here, to run repeatedly:
if (!runComplete) {
int sum = 0;
for(int i = 1; i < 51; i ++) {
lcd.setCursor(0,0);
lcd.print(i);
sum += i;
lcd.setCursor(0, 1);
lcd.print(sum);
delay(500);
}
runComplete = true;
}
}