These are chat archives for Makuna/NeoPixelBus

17th
Dec 2016
Michael Miller
@Makuna
Dec 17 2016 00:07
One of the issues I ran into with UDP is that the quality of your WiFi AP matters. Early on I thought I found a bug with ESP and UDP; but it turned out that my cheap WiFi AP would only send the first five packets from any one client and then clamp them down as some sort of poor mans security feature. But if the UDP came through the LAN to the AP to then be sent out it worked; basically stopping my ESPs from sending more than a few UDP packets. I switched from that cheap WiFi to better one and the problem went away.
3DSasha
@3DSasha
Dec 17 2016 16:29
@Makuna Bitmap testing.... I created bmp file with red and black lines. When I have to see red strip it shows (at order, at full brightness) 1-RED 2-BLUE 3-black 4 -GREEN 5-RED 6-BLUE and etc same pattern. When I have to see black strip I see ... black strip.
I used your Neopixelbitmap example. Only led number =100, filename and time of animation are changed.
3DSasha
@3DSasha
Dec 17 2016 16:55
omg... I forgtot one important thing!! Change from RGBW default to RGB color feature.. Now I have no troubles.. Now all is working fine!
Michael Miller
@Makuna
Dec 17 2016 19:55
@3DSasha LOL. Do not kick yourself too much. I wrote this library, and I have various LEDs (strips, SMDs, diffused singles) and I catch myself with it once in awhile; scratching my head of what could be wrong and all the problem is the wrong color feature is being used ;-)
Its especially bad when switching from a W supported to non W supported and back ;-)
joefly888
@joefly888
Dec 17 2016 21:41
@Makuna good news, I got the udp data packets coming from lighshowpi to the ESP with 6 neopixels, fyi, it is streaming a lot, it seems multiple times per microsecond. it is coming in as a string, which I can pick off. Now there are 18 data points, so I believe rgb per led, [0, 126, 19, 0, 78, 46, 0, 57, 60, 0, 101, 33, 0, 126, 19, 0, 118, 23
how do you recommend now to use this data with neopixelbus?
which one of your examples is best to follow, I want to set the RGB individually for each pixel
i see a command such as strip.SetPixelColor(0, red); how do I set the RGB value instead of using RED?
joefly888
@joefly888
Dec 17 2016 22:21
see that the data on the rpi is an array, so I guess the only way is to send it is to serialize it, then on the ESP is it best to work directly with the serialized data or is there an easy way to convert it back to an array?
Michael Miller
@Makuna
Dec 17 2016 23:52
The UDP packet can be binary, its just common in scripts to serialize to text for HTML protocols (wasteful but standard). To change it back to an array requires you to find a parse library for what ever serialize protocol they use; or switch their code to send binary data.