mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Basic documentation for the UDP led driver
Former-commit-id: e5725b467e3960f84e2c4c6d5dd8e6e117f7188d
This commit is contained in:
parent
6d062adc35
commit
6b0bf2ac90
57
doc/UDP_led_driver.txt
Normal file
57
doc/UDP_led_driver.txt
Normal file
@ -0,0 +1,57 @@
|
||||
BACKGROUND
|
||||
---------------------------------------------------------
|
||||
The UDP led device type can be used to send LED data over UDP packets.
|
||||
It was originally designed to support an ESP8266 Wifi module based WS2812
|
||||
LED strip controller.
|
||||
|
||||
I've used this to support :
|
||||
- A string of 600 LEDs as xmas decorations
|
||||
The effects development kit is great for these scenarios
|
||||
|
||||
- a 61 LED collection of concentric circles
|
||||
This has been used as a "night light" and a super lo-res
|
||||
TV
|
||||
|
||||
In each of these cases, the hyperion-remote iOS app is a great way to
|
||||
control the effects.
|
||||
|
||||
|
||||
CONFIG
|
||||
---------------------------------------------------------
|
||||
Simple example for devices that support a raw binary protocol.
|
||||
"device" :
|
||||
{
|
||||
"name" : "MyPi",
|
||||
"type" : "udp",
|
||||
"output" : "esp201-0.home:2391", "protocol" : 0,
|
||||
"rate" : 1000000,
|
||||
"colorOrder" : "grb"
|
||||
},
|
||||
|
||||
|
||||
|
||||
If you are using an ESP8266/Arduino device with a long LED strip, you chould use this alternate protocol.
|
||||
The ESP8266/Arduino doesnt support datagram re-assembly so will never see any udp packets greater than 1450.
|
||||
"device" :
|
||||
{
|
||||
"name" : "MyPi",
|
||||
"type" : "udp",
|
||||
// "output" : "esp201-0.home:2392", "protocol" : 2, "maxpacket" : 1450,
|
||||
"rate" : 1000000,
|
||||
"colorOrder" : "rgb"
|
||||
},
|
||||
|
||||
PROTOCOL
|
||||
---------------------------------------------------------
|
||||
Simple UDP packets are sent.
|
||||
|
||||
Packet Format protocol 0:
|
||||
3 bytes per LED as R, G, B
|
||||
|
||||
Packet Format protocol 2:
|
||||
0: update number & 0xf;
|
||||
1: fragment of this update
|
||||
2: 1st led# of this update - high byte
|
||||
3: 1st led# of this update - low byte
|
||||
4..n 3 bytes per LED as R, G, B
|
||||
|
Loading…
Reference in New Issue
Block a user