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