microsoft / pxt-neopixel

A Neo-Pixel package for pxt-microbit
https://makecode.microbit.org/pkg/microsoft/pxt-neopixel
MIT License
58 stars 141 forks source link

implement RGB in addition to existing GRB format #7

Closed thtuerk closed 7 years ago

thtuerk commented 7 years ago

Dear developers,

many thanks for the work on pxt for the BBC microbit in general and the Neopixel lib in particular. They are great tools to teach children about computers and programming.

I was building some Christmas decoration with a child. For this I wanted to use some through hole Neopixels I had lying around (https://www.adafruit.com/products/1734). Unluckily these use RGB encoding instead of GRB encoding. While switching the red and green values is easy enough, for young children there is enough other stuff to bother about. To avoid confusion, I extended the lib to support the RGB format as well as the much more common GRB format.

In case, you are interested, I make my code available via this pull request. Many thanks again for making Neopixels so easily usable. You enabled me to do this fun project with an 12 year old who had never programmed before.

Thomas Tuerk

pelikhan commented 7 years ago

Thanks, I've bumped the library with your changes. You should be able to update your project by clicking on the "recycle" dialog in the "Explorer" view (in JavaScript)