NeoPixel Library

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
Posts: 6
Joined: Sun Apr 24, 2016 1:23 pm

NeoPixel Library

Post by DWiskow » Mon May 16, 2016 8:13 am

I have both a couple of pyBoard 1.1's and a number of ESP8266 Adafruit and NodeMCU/DOIT boards . . . Having spent the weekend playing with the latest 1.8 release of MicroPython on all of these, I am a little perplexed that the ESP8266 has support for the NeoPixel library built in but the pyBoard version doesn't appear to! . . . Or am I doing something wrong ?

Posts: 1
Joined: Sun Jul 14, 2019 9:00 pm

Re: NeoPixel Library

Post by drew » Sun Jul 14, 2019 9:10 pm

Three years down the line, I'm running MicroPython 1.11 on a pyBoard..... and it still seems to be the case, none of the neopixel library documented on the micropython website seems to apply to the pyBoard. I did get it working ok via a 3rd party library..

Posts: 1
Joined: Wed Jul 17, 2019 11:28 am

Re: NeoPixel Library

Post by klauskn » Wed Jul 17, 2019 11:31 am

-> I did get it working ok via a 3rd party library..

Now it would be helpful to know which library you are using.

User avatar
Posts: 892
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia

Re: NeoPixel Library

Post by jimmo » Wed Jul 17, 2019 11:55 am

Possibly or Both of these generate the WS2812 data signal using SPI (by oversampling each bit into several SPI bits).

If you feel like building your own firmware, I have a neopixel driver written in C for pyboard that I've been meaning to find the time to upstream. PM me and I can rebase it onto master and share it. (Currently it adds a "neo" method to machine.Pin that takes an array of RGB data and uses the cycle counter to generate accurate timing for the WS2812 data signal, there's a corresponding that provides an easy high-level API to managing the RGB data -- looks just like the micro:bit or esp8266 neopixel library, with some extra methods -- Obviously to upstream it I have to not make it a method on Pin! :) ).

It's worth mentioning though -- if you have the choice, use DotStars (APA102) instead of Neopixels, because they have a much nicer SPI interface.

Post Reply