roughly working

This commit is contained in:
Jeff Clement 2016-02-11 19:03:42 -07:00
parent 3abeeddced
commit d239e9ce34
1 changed files with 15 additions and 7 deletions

View File

@ -67,16 +67,24 @@ bool started = false;
bool allDone;
#define STATE_READY 1
#define STATE_RUNNING 2
#define STATE_DONE 3
short state = 0;
void loop()
{
if (digitalRead(PIN_RESET) == LOW) {
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Ready?");
started = false;
resetCarTimers();
digitalWrite(LED_BUILTIN, LOW);
if (state != STATE_READY) {
state = STATE_READY;
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Ready?");
started = false;
resetCarTimers();
digitalWrite(LED_BUILTIN, LOW);
}
} else {
// if we just started, record current millis counter
if (!started) {