Page 1 of 4
Driver for WS2812 RGB LEDs (NeoPixels, ...)
Posted: Fri Nov 07, 2014 9:27 am
by Architekt
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
Re: Driver for WS2812 RGB LEDs (NeoPixels, ...)
Posted: Mon Nov 10, 2014 1:15 pm
by fma
Nice! I'll give it a try...
Thanks for sharing!
Re: Driver for WS2812 RGB LEDs (NeoPixels, ...)
Posted: Sun Nov 23, 2014 6:30 pm
by Architekt
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
- 240 RGB LEDs driven by MicroPython
- NeoPixels strip - small 2.jpg (124.57 KiB) Viewed 45094 times
Re: Driver for WS2812 RGB LEDs (NeoPixels, ...)
Posted: Sun Nov 23, 2014 7:03 pm
by fma
Excellent!
Re: Driver for WS2812 RGB LEDs (NeoPixels, ...)
Posted: Tue Nov 25, 2014 4:37 pm
by LarryTru
Thanks for the effort!
Larry
Re: Driver for WS2812 RGB LEDs (NeoPixels, ...)
Posted: Mon Dec 08, 2014 9:41 pm
by Damien
DMA transfers are now supported by the SPI bus, so you should no longer need to disable interrupts while doing the spi.send call.
Re: Driver for WS2812 RGB LEDs (NeoPixels, ...)
Posted: Wed Dec 10, 2014 10:51 am
by Architekt
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.
Re: Driver for WS2812 RGB LEDs (NeoPixels, ...)
Posted: Wed Dec 10, 2014 11:14 am
by fma
So, DMA usage is totally transparent?
Re: Driver for WS2812 RGB LEDs (NeoPixels, ...)
Posted: Wed Dec 10, 2014 6:19 pm
by Damien
fma wrote:So, DMA usage is totally transparent?
Yes. If interrupts are enabled it uses DMA, otherwise it uses polling.
Re: Driver for WS2812 RGB LEDs (NeoPixels, ...)
Posted: Wed Dec 10, 2014 6:50 pm
by fma
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?