OP's code
#include <LiquidCrystal.h>
int pin_RS = 8;
int pin_EN = 9;
int pin_DB4 = 4;
int pin_DB5 = 5;
int pin_DB6 = 6;
int pin_DB7 = 7;
int pin_control = 10;
LiquidCrystal lcd (pin_RS, pin_EN, pin_DB4, pin_DB5, pin_DB6, pin_DB7);
void lcdBegin()
{
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world!");
}
void setup() {
// enable debug
Serial.begin(9600);
// initialize LCD
lcdBegin();
// set up the control pin as input
pinMode(pin_control, INPUT_PULLUP);
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis() / 1000);
// show loop in debug
Serial.println(millis());
if (digitalRead(pin_control) == LOW) {
lcdBegin();
}
}
You should not update the lcd every pass through loop.
You can print when data changes--that is if millis()/1000 != to previous value. You will need an additional variable to hold the previous value.
Alternatively, refresh the lcd periodically with a millis() timer following the "blink without delay()" method. Your eye can't follow fast changes, and a 200 ms period is probably as fast as you ever want. In your case, looking at seconds, the updates could be at 500ms or 1000ms.