//incomplete, need info from poster about what the code should do
//- count down from pot setting?
//- count up from 0 to setting?
//- reset button needed?
#include <LiquidCrystal.h>
const int numCols = 16;
const int numRows = 2;
int setting;//value in seconds which we will count down
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
lcd.begin(numCols, numRows);
lcd.print("Egg Timer");
setting = map(analogRead(pot),0,1023,30,300);
}
//
void loop() {
lcd.setCursor(0, 1);
// clear the second row before printing
lcd.print(" "); // 16 spaces
lcd.setCursor(0, 1);
unsigned long totalSeconds = millis() / 1000;
unsigned int minutes = totalSeconds / 60;
unsigned int seconds = totalSeconds % 60;
lcd.print(minutes);
lcd.print(" m ");
if (seconds < 10) lcd.print('0');
lcd.print(seconds);
lcd.print(" s");
delay(250); // modest update rate
}
void dispSetting(){}