Neopixel issue

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
Luzo91
Posts: 2
Joined: Wed Aug 22, 2018 12:04 am

Neopixel issue

Post by Luzo91 » Wed Aug 22, 2018 12:13 am

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,

deonis
Posts: 11
Joined: Wed Aug 08, 2018 3:02 am

Re: Neopixel issue

Post by deonis » Wed Aug 22, 2018 6:32 pm

How many LEDs do you have?

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

User avatar
mattyt
Posts: 410
Joined: Mon Jan 23, 2017 6:39 am

Re: Neopixel issue

Post by mattyt » Sat Aug 25, 2018 4:40 am

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)

Luzo91
Posts: 2
Joined: Wed Aug 22, 2018 12:04 am

Re: Neopixel issue

Post by Luzo91 » Sun Aug 26, 2018 6:17 pm

Thenks a lot Mattyt, it's working perfectly

Post Reply