The use of the ESP8266 in the world of IoT

User avatar
By perigalacticon
#75710 I want to send addressable led data to several esp8266s from a 'server' esp8266 or esp32 at 40fps. I am new to networking prototcols. I tried using UDP to send data to each esp8266 but it was too slow but I'm not sure why.

What is the best way to do this? I want to stream data to 5-10 led strips (each with an esp8266) that are ~150 pixels long. So far I've identified these methods: UDP transmission, TCP client connections, and MQTT as possible alternatives. I'm looking for advice for the best way stream lots of data to lots of ESP8266s in general.
User avatar
By rudy
#75712 The ESP32 sounds like the way to go. I think the dual cores will make a difference.

You said what your target is, but what have you been able to get working acceptably so far? Number of strips and at what frame rate.

I think that UDP should be the quickest, but I found your question about MQTT interesting. If you had a local broker/server. But then I'm thinking that would have to be something like a Raspberry Pi. And thinking on that a bit further, maybe you should be using a Raspberry Pi for doing the work of the existing Server. A Raspberry Pi for the main server and ESP8266s for the led strips.
User avatar
By Barnabybear
#75719 Hi, UDP is the common way to do this amongst the seasonal lighting enthusiasts and well proven at 40FPS. The format used is normally sACN inparticular the E1.31 format as that is supported by many of the sequencers / show players xLights, Vixen, FPP, Gladiator and Madrix to name a few.

With regard to receiving the packets and passing on the data to your addressable LEDs I recommend the ESPixelstick work done by Forkineye (Shelby). This can be run on a normal ESP8266 development board (I use the Wemos) with only the addition of a 3.3V to 5V level shifter on the output (not always needed). At 40 FPS this can control 640 addressable LEDs and double that at 20FPS.
http://forkineye.com/espixelstick/
https://github.com/forkineye/ESPixelStick
Shelbys show on youtube:
https://www.youtube.com/watch?v=fERc5lDJHq0

To send the E1.31 packets I have a little sketch that I use for testing that should give you some pointers. For reference a Universe is 512 bytes of addressable LED data (170 2/3 pixels as we call them).
http://doityourselfchristmas.com/forums ... on-your-PC

A lot of reading but I hope that helps, feel free to post back if you need any help. Shelby’s ESPixelstick sketch also has the option to receive MQTT, it’s pretty cool.
User avatar
By perigalacticon
#75765 Thank you for the suggestions. I went through my entire project checking all hardware and code and when I finished I found there were no more glitches which I originally thought were dropped frames. I'm not sure what fixed it exactly. I used an ESP32 to stream UDP packets of WS2812B data from FastLED to 4 ESP8266s, each with a 30 led strand at 50fps no problems, it works great now.