Controlling WS2812 LEDs connected to your ESP32 via UDP.
- Setting and Filling pixels are not shown immediately, but after an
Update LEDspacket. - LED count, WiFi mode, WiFi SSID and WiFi Password are saved in non-volatile memory
- Set an empty password for open networks
- When the configured WiFi is not available the device will fall back to AP mode
- In AP mode the SSID is
NeopixelServer-XXXXXXwithXXXXXXbeing the last 3 byte of the mac address in hex - In AP mode the Password is empty (open network)
- After not receiving a packet for 10 seconds the fallback animation will be played
- After boot the fallback animation will be played
- The default fallback animation is turning all LEDs off (
01000000)
- Layout:
0x00 - Response:
"ok\n" - Example:
0x00
- Layout:
0x01 <16-bit offset> <8-bit red> <8-bit green> <8-bit blue> - Response: None
- Example:
0x01000100ff00sets pixel 1 to green
- Layout:
0x02 <16-bit offset> <16-bit length> <8-bit red> <8-bit green> <8-bit blue> - Response: None
- Example:
0x010000000f0000ffsets pixels 0 to 15 to blue
- Layout:
0x03 <16-bit offset> <16-bit length> <length times <8-bit red> <8-bit green> <8-bit blue>> - Reponse: None
- Example:
0x030010000200ff00ff0000set led 0x10 to green and 0x11 to red
- Layout:
0x10 <16-bit length> - Response:
"ok\n" - Example:
0x10003Csets LED count to 60
- Layout:
0x10 <8-bit index> - Response:
"ok\n"or"error: pin index out of range\n" - Example:
0x1103selects the third configured WS2812 pin (not GPIO3)
- Layout:
0x12 <8-bit index> <8-bit length> <length * 8-bit argument bytes> - Response:
"ok\n"if successfull - Example:
0x120203ff0000in fallback mode, turn all LEDs red - See below for a list of all animations and their arguments
- Layout:
0x20 <either 0x00 for AP or 0x01 for STA> - Response:
"ok\n" - Example:
0x2001sets mode to STA
- Layout:
0x21 <8-bit length> <length byte SSID> - Response:
"ok\n" - Example:
"\x21\x08Freifunk"sets WiFi SSID to Freifunk
- Layout:
0x21 <8-bit length> <length byte SSID> - Response:
"ok\n" - Example:
"\x21\x09hello1234"sets WiFi Password to "hello1234"
- Layout:
0x30 <16-bit output state> - Response:
"ok\n" - Example:
30ffffset all ports to HIGH
- Layout:
0xff - Response:
"rebooting...\n" - Example:
0xff
TODO proper documentation!
For now check the fallbackAnimations array in the source code
