From c450cfb7c9c0c6af1fa5f7c94e3822f562dbd404 Mon Sep 17 00:00:00 2001 From: Robin Cerny Date: Mon, 22 Sep 2025 16:12:14 +0200 Subject: [PATCH] Changed Clock Brightness to 128, added relay 3 to be controlled by the lightswitch --- ROFLS_Arena_Controller/Output_Handler.ino | 2 ++ .../ROFLS_Arena_Controller.ino | 33 ++++++++++--------- .../ROFLS_Arena_LED_Strip_Clock.ino | 2 +- ROFLS_Arena_Remote/ROFLS_Arena_Remote.ino | 6 ++-- 4 files changed, 24 insertions(+), 19 deletions(-) diff --git a/ROFLS_Arena_Controller/Output_Handler.ino b/ROFLS_Arena_Controller/Output_Handler.ino index 8f034e2..7152e1f 100644 --- a/ROFLS_Arena_Controller/Output_Handler.ino +++ b/ROFLS_Arena_Controller/Output_Handler.ino @@ -25,9 +25,11 @@ void openPITmanually() { void arenaLIGHT() { if (switchLIGHT.on()) { digitalWrite(LIGHT_PIN, LOW); + digitalWrite(LIGHT_PIN2, LOW); } else { digitalWrite(LIGHT_PIN, HIGH); + digitalWrite(LIGHT_PIN2, HIGH); } } diff --git a/ROFLS_Arena_Controller/ROFLS_Arena_Controller.ino b/ROFLS_Arena_Controller/ROFLS_Arena_Controller.ino index 5e3285a..30c3301 100644 --- a/ROFLS_Arena_Controller/ROFLS_Arena_Controller.ino +++ b/ROFLS_Arena_Controller/ROFLS_Arena_Controller.ino @@ -26,7 +26,7 @@ // Relays: #define PIT_RELEASE_PIN 37 #define LIGHT_PIN 39 -#define UNUSED_RELAY3_PIN 35 +#define LIGHT_PIN2 35 #define UNUSED_RELAY4_PIN 33 const byte relayOnState = LOW; @@ -69,7 +69,7 @@ CountDown ReadyCountDown(CountDown::SECONDS); // Rumble stopwatch StopWatch rumbleTIME(StopWatch::SECONDS); -int CLOCK_LED_BRIGHTNESS = 64; // 64 is okay +int CLOCK_LED_BRIGHTNESS = 128; // 64 is okay int BLINK_COUNTER_REDTEAM = 0; int BLINK_COUNTER_BLUETEAM = 0; @@ -85,11 +85,11 @@ bool resumeFight = false; // ESP-NOW config // send config, Clock: // A Arena -//uint8_t broadcastAddressClock1[] = {0x48, 0x27, 0xE2, 0x5D, 0xB6, 0x84}; -//uint8_t broadcastAddressClock2[] = {0xD8, 0x3B, 0xDA, 0xC8, 0x95, 0x42}; +uint8_t broadcastAddressClock1[] = {0x48, 0x27, 0xE2, 0x5D, 0xB6, 0x84}; +uint8_t broadcastAddressClock2[] = {0xD8, 0x3B, 0xDA, 0xC9, 0x49, 0xC6}; // B Arena -uint8_t broadcastAddressClock1[] = {0xD8, 0x3B, 0xDA, 0xC9, 0x49, 0xC6}; -uint8_t broadcastAddressClock2[] = {0xD8, 0x3B, 0xDA, 0xC8, 0xFF, 0xFA}; +//uint8_t broadcastAddressClock1[] = {0xD8, 0x3B, 0xDA, 0xC9, 0x49, 0xC6}; +//uint8_t broadcastAddressClock2[] = {0xD8, 0x3B, 0xDA, 0xC8, 0xFF, 0xFA}; // struct for clock data typedef struct struct_message_Clock { int sendMinutes; @@ -105,11 +105,11 @@ struct_message_Clock sendClockDATA; // send config, pilot buttons: // A Arena -//uint8_t broadcastAddressREDTEAMbutton[] = {0x84, 0xFC, 0xE6, 0xC7, 0x23, 0x14}; -//uint8_t broadcastAddressBLUETEAMbutton[] = {0x84, 0xFC, 0xE6, 0xC7, 0x1A, 0x02}; +uint8_t broadcastAddressREDTEAMbutton[] = {0x84, 0xFC, 0xE6, 0xC7, 0x23, 0x14}; +uint8_t broadcastAddressBLUETEAMbutton[] = {0x84, 0xFC, 0xE6, 0xC7, 0x1A, 0x02}; // B Arena -uint8_t broadcastAddressREDTEAMbutton[] = {0xD8, 0x3B, 0xDA, 0xC8, 0x95, 0x58}; -uint8_t broadcastAddressBLUETEAMbutton[] = {0xD8, 0x3B, 0xDA, 0xC8, 0x95, 0x1C}; +//uint8_t broadcastAddressREDTEAMbutton[] = {0xD8, 0x3B, 0xDA, 0xC8, 0x95, 0x58}; +//uint8_t broadcastAddressBLUETEAMbutton[] = {0xD8, 0x3B, 0xDA, 0xC8, 0x95, 0x1C}; // Structure for sending data typedef struct struct_message_send { @@ -122,9 +122,12 @@ struct_message_send sendToBLUETEAMbutton; // ESP-Now stuff for the Pit controller // A Arena -//uint8_t broadcastAddressPitController[] = {0x84, 0xFC, 0xE6, 0xC7, 0x19, 0xDE}; +uint8_t broadcastAddressPitController[] = {0x84, 0xFC, 0xE6, 0xC7, 0x19, 0xDE}; // B Arena -uint8_t broadcastAddressPitController[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xB0, 0x0B}; +//uint8_t broadcastAddressPitController[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xB0, 0x0B}; +// Test Pit controller +//uint8_t broadcastAddressPitController[] = {0x94, 0xA9, 0x90, 0x0B, 0x21, 0x64}; + // Structure for sending data typedef struct struct_message_pit { bool PIT; // LED state @@ -249,13 +252,13 @@ void setup() { digitalWrite(PIT_RELEASE_PIN, relayOffState); pinMode(LIGHT_PIN, OUTPUT); digitalWrite(LIGHT_PIN, LOW); // have it by default on, to prevent flickering, needs a better fix tho - pinMode(UNUSED_RELAY3_PIN, OUTPUT); - digitalWrite(UNUSED_RELAY3_PIN, relayOffState); + pinMode(LIGHT_PIN2, OUTPUT); + digitalWrite(LIGHT_PIN2, LOW); // have it by default on, to prevent flickering, needs a better fix tho pinMode(UNUSED_RELAY4_PIN, OUTPUT); digitalWrite(UNUSED_RELAY4_PIN, relayOffState); // set status LED outputs: pinMode(LIGHT_STATUS_LED, OUTPUT); - digitalWrite(LIGHT_PIN, HIGH); // have it by default on, to prevent flickering, needs a better fix tho + digitalWrite(LIGHT_STATUS_LED, HIGH); pinMode(AUTOPIT_STATUS_LED, OUTPUT); digitalWrite(AUTOPIT_STATUS_LED, LOW); pinMode(MODE_STATUS_LED, OUTPUT); diff --git a/ROFLS_Arena_LED_Strip_Clock/ROFLS_Arena_LED_Strip_Clock.ino b/ROFLS_Arena_LED_Strip_Clock/ROFLS_Arena_LED_Strip_Clock.ino index 41e1f59..79a19a1 100644 --- a/ROFLS_Arena_LED_Strip_Clock/ROFLS_Arena_LED_Strip_Clock.ino +++ b/ROFLS_Arena_LED_Strip_Clock/ROFLS_Arena_LED_Strip_Clock.ino @@ -59,7 +59,7 @@ void setup() { //FastLED.addLeds(leds_TIMER, NUM_LEDS_TIMER); // GRB ordering is typical FastLED.addLeds(leds_TIMER, NUM_LEDS_TIMER); // GRB ordering is typical //FastLED.setMaxRefreshRate(10, true); - FastLED.setMaxPowerInVoltsAndMilliamps(5,2000); // Limit to 10W of output power + FastLED.setMaxPowerInVoltsAndMilliamps(5,4000); // Limit to 20W of output power // set default values // default screen, just to show it's up and running but hasn't received any data, should display 00:00 in blue diff --git a/ROFLS_Arena_Remote/ROFLS_Arena_Remote.ino b/ROFLS_Arena_Remote/ROFLS_Arena_Remote.ino index d1b41dd..1ab0f4d 100644 --- a/ROFLS_Arena_Remote/ROFLS_Arena_Remote.ino +++ b/ROFLS_Arena_Remote/ROFLS_Arena_Remote.ino @@ -13,7 +13,7 @@ // 1 = Red Team Button // 2 = Blue Team Button const bool writeBoardID = false; -int boardID = 0; +int boardID = 1; // Hardware connections #define START_BTN_PIN 10 @@ -47,9 +47,9 @@ bool sendDATAvar = false; // REPLACE WITH YOUR RECEIVER MAC Address // A Arena -//uint8_t broadcastAddress[] = {0x84, 0xFC, 0xE6, 0xC7, 0x1A, 0x8C}; +uint8_t broadcastAddress[] = {0x84, 0xFC, 0xE6, 0xC7, 0x1A, 0x8C}; // B Arena -uint8_t broadcastAddress[] = {0xD8, 0x3B, 0xDA, 0xC9, 0x0C, 0xEE}; +//uint8_t broadcastAddress[] = {0xD8, 0x3B, 0xDA, 0xC9, 0x0C, 0xEE}; // Structure example to send data // Must match the receiver structure