Driver for WS2812 RGB LEDs (NeoPixels, ...)

Showroom for MicroPython related hardware projects.
Target audience: Users wanting to show off their project!
Architekt
Posts: 10
Joined: Wed Oct 15, 2014 8:59 am

Driver for WS2812 RGB LEDs (NeoPixels, ...)

Post by Architekt » Fri Nov 07, 2014 9:27 am

Hi, I made driver for WS2812 (and compatible) RGB LEDs. Those are popular RGB LEDs used for example in AdaFruit NeoPixels.

Driver: https://github.com/JanBednarik/micropython-ws2812

MicroPython and NeoPixels ring demo: http://youtu.be/ADYxiG40UJ0

fma
Posts: 164
Joined: Wed Jan 01, 2014 5:38 pm
Location: France

Re: Driver for WS2812 RGB LEDs (NeoPixels, ...)

Post by fma » Mon Nov 10, 2014 1:15 pm

Nice! I'll give it a try...

Thanks for sharing!
Frédéric

Architekt
Posts: 10
Joined: Wed Oct 15, 2014 8:59 am

Re: Driver for WS2812 RGB LEDs (NeoPixels, ...)

Post by Architekt » Sun Nov 23, 2014 6:30 pm

I have played with 4 meters of NeoPixels Strip which has 240 RGB LEDs in total.

Driver works fine. I just released v1.1 with some speed optimizations. Should work for much more RGB LEDs :)

In action: http://youtu.be/vb5l3h1-TqA
NeoPixels strip - small 2.jpg
240 RGB LEDs driven by MicroPython
NeoPixels strip - small 2.jpg (124.57 KiB) Viewed 44831 times

fma
Posts: 164
Joined: Wed Jan 01, 2014 5:38 pm
Location: France

Re: Driver for WS2812 RGB LEDs (NeoPixels, ...)

Post by fma » Sun Nov 23, 2014 7:03 pm

Excellent!
Frédéric

LarryTru
Posts: 26
Joined: Wed Aug 06, 2014 5:46 am

Re: Driver for WS2812 RGB LEDs (NeoPixels, ...)

Post by LarryTru » Tue Nov 25, 2014 4:37 pm

Thanks for the effort! :)

Larry

Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

Re: Driver for WS2812 RGB LEDs (NeoPixels, ...)

Post by Damien » Mon Dec 08, 2014 9:41 pm

DMA transfers are now supported by the SPI bus, so you should no longer need to disable interrupts while doing the spi.send call.

Architekt
Posts: 10
Joined: Wed Oct 15, 2014 8:59 am

Re: Driver for WS2812 RGB LEDs (NeoPixels, ...)

Post by Architekt » Wed Dec 10, 2014 10:51 am

Damien wrote:DMA transfers are now supported by the SPI bus, so you should no longer need to disable interrupts while doing the spi.send call.
Thank's for info. I have updated the driver.

fma
Posts: 164
Joined: Wed Jan 01, 2014 5:38 pm
Location: France

Re: Driver for WS2812 RGB LEDs (NeoPixels, ...)

Post by fma » Wed Dec 10, 2014 11:14 am

So, DMA usage is totally transparent?
Frédéric

Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

Re: Driver for WS2812 RGB LEDs (NeoPixels, ...)

Post by Damien » Wed Dec 10, 2014 6:19 pm

fma wrote:So, DMA usage is totally transparent?
Yes. If interrupts are enabled it uses DMA, otherwise it uses polling.

fma
Posts: 164
Joined: Wed Jan 01, 2014 5:38 pm
Location: France

Re: Driver for WS2812 RGB LEDs (NeoPixels, ...)

Post by fma » Wed Dec 10, 2014 6:50 pm

Great! But as I understand from your post on the other thread, the call to send() is still blocking during transfert, so CPU is not availabe for other tasks. Am I right?
Frédéric

Post Reply