diff --git a/main/main.ino b/main/main.ino index e795a2c..b16740c 100644 --- a/main/main.ino +++ b/main/main.ino @@ -11,6 +11,8 @@ #define PN532_CS 10 +// Using this library to set a timeout on readPassiveTagID +// The library in use is slightly modified to fix this issue: https://github.com/adafruit/Adafruit-PN532/issues/117 Adafruit_PN532 nfc(PN532_CS); const int rs = 9, en = 8, d4 = 5, d5 = 4, d6 = 3, d7 = 2; @@ -19,7 +21,7 @@ LiquidCrystal lcd(rs, en, d4, d5, d6, d7); Station stations[4] = { Station(1680767519, "Yellow"), Station(3346823711, "Green"), Station(3569318175, "Pink"), Station(2174777887, "Blue") }; Station* currentStation; -Timer stationDetectionTimer(3000, true); +Timer stationDetectionTimer(500, true); StateMachine stateMachine(new Startup()); @@ -52,7 +54,7 @@ void loop(void) { stateMachine.update(Context(stations, deltaTime)); lastLoopTime = currentLoopTime; - delay(100); + delay(10); } void setupNFC() {