parallaxinc / Simple-Libraries

Contents of the SimpleIDE workspace folder and its Parallax Learn Simple Libraries subfolder.
http://learn.parallax.com/propeller-c-set-simpleide/update-your-learn-folder
21 stars 21 forks source link

Update libws2812 to support 2048 LEDs #203

Closed robspublic closed 3 years ago

robspublic commented 3 years ago

Update the command word for the ws2812 driver to use 3 of the unused bits from the pin field to extend the led count to 11 bits. With the Propeller only having 32 pins, 5 bits are sufficient, and the code was already masking the value down to 5bits when processing the command word.

pjewald commented 3 years ago

@robspublic, is there an open issue tied to this PR? I don't see a use case for this change.

robspublic commented 3 years ago

@pjewald I just ran in to this issue while I was building a project where I needed to drive 300 LEDs on a ws2812b LED strip and discovered that it was wrapping over at 256, so I updated the code and figured I'd share it as with the strips it is easy to get a few hundred LEDS on a channel.

Let me know if an issue is needed, I'm happy to write it up if so.

AndyLindsay commented 3 years ago

Thank you for your contribution!