Page 1 of 1

Neopixel issue

Posted: Wed Aug 22, 2018 12:13 am
by Luzo91
Hi,

I have an issue with the neopixel library, when I try the code from the wiki and I type "np. write()", all leds go white and when I renew the "np. write()" it do the job. It go wrong evry two "np. write()".

Can someone help me?

Sorry for my bad english

Thanks,

Re: Neopixel issue

Posted: Wed Aug 22, 2018 6:32 pm
by deonis
How many LEDs do you have?

try this code out https://github.com/deonis1/nphttpd

Re: Neopixel issue

Posted: Sat Aug 25, 2018 4:40 am
by mattyt
Do you happen to be using an ESP32?

There's an issue on that port that many Neopixels behave similarly to what you describe unless you pass a 'timing=True' when you instantiate the Neopixel class. See #159 on the old ESP32 port repo for details. So try something like:

Code: Select all

pixel_strip = neopixel.NeoPixel(machine.Pin(12), 8, timing=True)

Re: Neopixel issue

Posted: Sun Aug 26, 2018 6:17 pm
by Luzo91
Thenks a lot Mattyt, it's working perfectly