/* _ __ _ _ __ _____ ___ | |/ _ _| |__ | |/ /__ _ _ __|_ _|_ _|_ __ ___ ___ _ __ | ' | | | | '_ \| ' // _` | '__ | | | || '_ ` _ \ / _ | '__| | . | |_| | |_) | . | (_| | | | | | || | | | | | __| | |_|\_\__,_|_.__/|_|\_\__,_|_| |_| |___|_| |_| |_|\___|_| */ #include "Arduino.h" #include #include 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 #define DISPLAY_LINES 4 // assume all cars are on sequential digital pins #define PIN_CAR_STARTING 3 // number of cars (4 max) #define CAR_COUNT 4 // buffer for the LCD line char buffer[40]; void setup() { pinMode(PIN_RESET, INPUT_PULLUP); pinMode(PIN_LED, OUTPUT); // initialize each car PIN for(short i=0; i