From 3abeeddced5aeb9bdb07e10080e1c5ceaa14b71b Mon Sep 17 00:00:00 2001 From: Jeff Clement Date: Thu, 11 Feb 2016 19:02:19 -0700 Subject: [PATCH] roughly working --- src/main.cpp | 65 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 18 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index b6d47f8..959c713 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -16,28 +16,56 @@ elapsedMillis timeElapsed; #define PIN_RESET 2 #define PIN_CAR1 3 +typedef struct { + short pin; + unsigned int elapsedTime; +} CarTimer; + +#define PIN_CAR_STARTING 3 +#define CAR_COUNT 1 +CarTimer cars[CAR_COUNT]; + +// buffer for the LCD line +char buffer[40]; + void setup() { Serial.begin(9600); pinMode(PIN_RESET, INPUT_PULLUP); - pinMode(PIN_CAR1, INPUT_PULLUP); pinMode(LED_BUILTIN, OUTPUT); + // initialize each car PIN + for(short i=0; i