esp8266 neopixel_write glitches
Posted: Thu Aug 11, 2016 9:31 am
I use the following code in a timer callback to update/animate a large number (50+) of ws2812 neopixel leds in a timer callback every 10ms.
in the main loop i have the simple http server example running.
Bassically this works but sometimes the leds doent light up correctly. There are some glitches or they flicker or leds which should be off are on occassionally very randomly and short.
My first idea was that the neopixel_write function somehow gets interrupted and the pixeldata isn't written correctly. Could this be the case? is ther a workaround. Would it be possible to dissable intterrupts in the neopixel_write -> would this make wlan-networking non-functioning?
Another unrelated thing is when i send more than 1024 byte in the http response from the micropython esp8266 they are not displayed in the browser. Is this a known thing?
Best Regards.
in the main loop i have the simple http server example running.
Code: Select all
fh=open("leddata.dat","rb")
buf=bytearray(80*3)
def timercallback(x):
gloabal fh,buf
nr=fh.readinto(buf)
if nr==0:
fh.seek(0)
nr=fh.readinto(buf)
neopixel_write(neopin,buf,True)
My first idea was that the neopixel_write function somehow gets interrupted and the pixeldata isn't written correctly. Could this be the case? is ther a workaround. Would it be possible to dissable intterrupts in the neopixel_write -> would this make wlan-networking non-functioning?
Another unrelated thing is when i send more than 1024 byte in the http response from the micropython esp8266 they are not displayed in the browser. Is this a known thing?
Best Regards.