From 1d978cb2245de74db8f40157fd59c5f3f0923d85 Mon Sep 17 00:00:00 2001 From: Jeff Clement Date: Sat, 13 Feb 2016 13:20:39 -0700 Subject: [PATCH] placing --- platformio.ini | 1 + src/main.cpp | 41 +++++++++++++++++++++++++++++++---------- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/platformio.ini b/platformio.ini index 32589d0..714ed25 100644 --- a/platformio.ini +++ b/platformio.ini @@ -21,4 +21,5 @@ platform = atmelavr framework = arduino board = nanoatmega328 +build_flags = -Wl,-u,vfprintf -lprintf_flt -l #targets = upload diff --git a/src/main.cpp b/src/main.cpp index 4c19c33..ba544d5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -12,6 +12,7 @@ LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); #define PIN_RESET 2 #define PIN_CAR1 3 +#define PIN_LED LED_BUILTIN typedef struct { // input pin for this car @@ -24,7 +25,7 @@ typedef struct { #define PIN_CAR_STARTING 3 // number of cars (4 max) -#define CAR_COUNT 1 +#define CAR_COUNT 2 // array of cars Car cars[CAR_COUNT]; @@ -62,19 +63,38 @@ void resetCars() { } void displayTimers() { + short row = 0; lcd.clear(); - for(short i=0; i