From 6b0bf2ac90519d93e39b2fc4b05f3353471e6688 Mon Sep 17 00:00:00 2001 From: penfold42 Date: Fri, 8 Jan 2016 14:14:55 +1100 Subject: [PATCH] Basic documentation for the UDP led driver Former-commit-id: e5725b467e3960f84e2c4c6d5dd8e6e117f7188d --- doc/UDP_led_driver.txt | 57 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 doc/UDP_led_driver.txt diff --git a/doc/UDP_led_driver.txt b/doc/UDP_led_driver.txt new file mode 100644 index 00000000..646abe21 --- /dev/null +++ b/doc/UDP_led_driver.txt @@ -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 +