From 277da4465e1b0cebd91eab221da5a56a1393b589 Mon Sep 17 00:00:00 2001 From: KenwoodFox Date: Mon, 6 Nov 2023 11:23:28 -0500 Subject: [PATCH] Include changes from upstream --- Firmware/src/main.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Firmware/src/main.cpp b/Firmware/src/main.cpp index e1f6e85..2bb4bec 100644 --- a/Firmware/src/main.cpp +++ b/Firmware/src/main.cpp @@ -19,7 +19,8 @@ // Objects Encoder lEnc(LENCA, LENCB); Algorithm alg; -shiftDisplay disp = shiftDisplay(DIN_PIN, CLK_PIN, LAT_PIN); +shiftDisplay num = shiftDisplay(DIN_PIN, CLK_PIN, LAT_PIN); // Position 0 (furthest from chain) +shiftDisplay lamps = shiftDisplay(DIN_PIN, CLK_PIN, LAT_PIN); // Position 1 (closest) void setup(void) { @@ -30,8 +31,9 @@ void setup(void) // Ready up fresh algorithm! alg.init(); - // Initalize display - disp.begin(); + // Initalize displays and lights + num.begin(); + lamps.begin(); // Pins pinMode(LED_BUILTIN, OUTPUT); @@ -52,4 +54,8 @@ void loop() analogWrite(LMOT1, 120); analogWrite(LMOT2, 0); + + num.setDecimal(millis() % 1000 > 500); + num.setDigit(l_BLANK); + lamps.setDigit(0b00000001); }