From bb8f00f65ed24db98245aa51b647a895f5696a1b Mon Sep 17 00:00:00 2001 From: DjAngellas Date: Sun, 9 Mar 2025 17:49:44 -0400 Subject: [PATCH 1/4] Added Hostname and PixelBus Method Added hostname feature. Changed PixelBus method from 800kbps to DmaWS2812. --- lit_arduino.ino | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lit_arduino.ino b/lit_arduino.ino index 222b36c..b595106 100644 --- a/lit_arduino.ino +++ b/lit_arduino.ino @@ -9,11 +9,12 @@ const char* ssid = "OMITTED"; const char* password = "OMITTED"; +const char* hostname = "OMITTED"; const unsigned int port = 9000; WiFiUDP socket; char packetBuffer[PACKET_SIZE]; uint64_t latestTimestamp = 0; -NeoPixelBus neopixels(NUM_LEDS); +NeoPixelBus neopixels(NUM_LEDS); void setup() { Serial.begin(115200); @@ -39,6 +40,7 @@ void connectToWifi() Serial.println(ssid); WiFi.disconnect(); + WiFi.hostname(hostname); WiFi.begin(ssid, password); while (WiFi.status() == WL_DISCONNECTED) { From abc0f692d229f9a50af9dbc114f4b7dd49fc6066 Mon Sep 17 00:00:00 2001 From: DjAngellas Date: Sun, 9 Mar 2025 20:50:05 -0400 Subject: [PATCH 2/4] Update NeoPixelBus Options Update NeoPixelBus options to allow for the selection of output GPIO pin on ESP01/01-S when using WS2812x LEDs. --- lit_arduino.ino | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lit_arduino.ino b/lit_arduino.ino index b595106..188d598 100644 --- a/lit_arduino.ino +++ b/lit_arduino.ino @@ -14,7 +14,10 @@ const unsigned int port = 9000; WiFiUDP socket; char packetBuffer[PACKET_SIZE]; uint64_t latestTimestamp = 0; -NeoPixelBus neopixels(NUM_LEDS); +//Uncomment NeoEsp8266DmaWs2812xMethod to use ESP01/01-S GPIO0 +//NeoPixelBus neopixels(NUM_LEDS); +//Uncomment NeoEsp8266Uart1Ws2812xMethod to use ESP01/01-S GPIO2 +NeoPixelBus neopixels(NUM_LEDS); void setup() { Serial.begin(115200); From 41953401f8f6fcdf1ee150d1db6189c7f91ac817 Mon Sep 17 00:00:00 2001 From: DjAngellas Date: Sun, 9 Mar 2025 21:07:23 -0400 Subject: [PATCH 3/4] Comment clarification and cleanup Removed unnecessary comments. Clarified remaining comments. --- lit_arduino.ino | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lit_arduino.ino b/lit_arduino.ino index 188d598..ed20b6b 100644 --- a/lit_arduino.ino +++ b/lit_arduino.ino @@ -14,9 +14,10 @@ const unsigned int port = 9000; WiFiUDP socket; char packetBuffer[PACKET_SIZE]; uint64_t latestTimestamp = 0; -//Uncomment NeoEsp8266DmaWs2812xMethod to use ESP01/01-S GPIO0 + +//****Uncomment NeoEsp8266DmaWs2812xMethod to use ESP01/01-S GPIO0**** //NeoPixelBus neopixels(NUM_LEDS); -//Uncomment NeoEsp8266Uart1Ws2812xMethod to use ESP01/01-S GPIO2 +//****Uncomment NeoEsp8266Uart1Ws2812xMethod to use ESP01/01-S GPIO2**** NeoPixelBus neopixels(NUM_LEDS); void setup() { @@ -49,7 +50,6 @@ void connectToWifi() while (WiFi.status() == WL_DISCONNECTED) { delay(500); Serial.print("."); - //Serial.printf("%d", WiFi.status()); } Serial.println(""); Serial.println("IP address: "); @@ -58,7 +58,6 @@ void connectToWifi() uint64_t extractTimestamp(char* packetBuffer, int len) { char* timeArr = packetBuffer + len - 8; - // Serial.printf("%d %d %d %d %d %d %d\n", timeArr[0], timeArr[1], timeArr[2], timeArr[3], timeArr[4], timeArr[5], timeArr[6],timeArr[7]); return timeArr[0] + (timeArr[1]<<8) + (timeArr[2]<<16) + (timeArr[3]<<24) + (timeArr[4]<<32) + (timeArr[5]<<40) + (timeArr[6]<<48) + (timeArr[7]<<56); } From 9d7bbe36d141c12c594cd2e44be3fa93f1d47386 Mon Sep 17 00:00:00 2001 From: Wes Sims Date: Sun, 9 Mar 2025 21:35:40 -0400 Subject: [PATCH 4/4] Comment correction 3-9-2025 "//Uncomment NeoEsp8266DmaWs2812xMethod to use ESP01/01-S GPIO0" corrected to "//Uncomment NeoEsp8266DmaWs2812xMethod to use ESP01/01-S GPIO3 / RX" --- lit_arduino.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lit_arduino.ino b/lit_arduino.ino index ed20b6b..8e0ce93 100644 --- a/lit_arduino.ino +++ b/lit_arduino.ino @@ -15,7 +15,7 @@ WiFiUDP socket; char packetBuffer[PACKET_SIZE]; uint64_t latestTimestamp = 0; -//****Uncomment NeoEsp8266DmaWs2812xMethod to use ESP01/01-S GPIO0**** +//****Uncomment NeoEsp8266DmaWs2812xMethod to use ESP01/01-S GPIO3 / RX **** //NeoPixelBus neopixels(NUM_LEDS); //****Uncomment NeoEsp8266Uart1Ws2812xMethod to use ESP01/01-S GPIO2**** NeoPixelBus neopixels(NUM_LEDS);