The ESP8266 controller is preprogrammed with the ability to connect to your local wifi network and be remotely controlled.
Provisioning
Initially, the controller does not know how to connect to your network, so it sets up its own network. Here is how to set it up:
Controlling via http
You can control the LEDs via http by sending textual commands to controller. The format looks like this:
http://[ip address]/message?content=[message]
Controlling vs UDP
If you want realtime control of the LEDs, http may have too much latency, which may result in unexpected pauses. The controller also supports communicating through UDP.
To connect via UDP, use the same IP address and pass commands directly. The internal controller code runs at 100 Hz; if you drive with UDP messages at 60 Hz everything should just work great.
Supported Messages
All commands are three letters long, followed by another character (the examples use an underscore (“_”), followed by numeric parameters.
The following commands are supported:
Alternate
Alternate between two colors.
alt_r1,g1,b1,r2,g2,b2,time
r1, g1, b1: the rgb values (0,255) for the first color (0-255)
r2, b2, b2: the rgb values for the second color
time: the time for each color
Example: alt_0,100,000,000,000,000,250
Blend to
Blend from the current color to a specified color
rgb_r,g,b,time
r, g, b: the rgb values (0,255) for the new color
time: the time for the blend
Example: rgb_255,255,255,1000
Color rotate
Rotate through a bunch of different colors.
col_speed,brightness
speed: the speed of the rotate
brightness: The brightness of the colors
Example: col_5000,200
Flash decay
fdc_decay,min,max
decay: the speed of the decay
min: the minimum pause before the next flash
max: the maximum pause before the next flash
Example: fdcx250,10,500
Full control
Full control is used to control the color of all the leds directly.
ind_chunk,data-bytes
chunk: the number of leds to apply each set of data to.
data-bytes: colors express as two digit HEX values in the format RRGGBB
Example: ind_011,000044440000004400
Each color in data-bytes will apply to 11 LEDs. The data-bytes contain 3 color values:
000044 – a blue value
440000 – a red value
000044 – a green value
Save
Save the current animation so that it will use that animation when rebooting.
s
Set pixel count
Set the number of pixels that the controller will use. This will result in a reboot of the controller.
n_count
count: the number of pixels
Example: n_13
So, what do you think ?