New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Puck.js to drive Neopixel/WS281x/APA10x RGB pixels #1023
Comments
Hi Gordon, tried this simple code to control some neopixels with a Puck, expected to have eight white leds, but did not work. I guess there is something wrong with the code I am using.
|
Oh completely forgot about that NPs need special timing like used with
Can the ESP8266.neopixelWrite() be implemented as NRF.neopixelWrite() to handle this ? |
Have a workaround for now: Puck - USART - ESP8266 - Neopixel Also started to port ESP8266.neopixelWrite() to NRF.neopixelWrite().
could need some help .... |
It's probably better to do as suggested in this bug, and to just enable the full-speed SPI write - in which case the code from your 2nd post should work. Disabling interrupts on nRF52 can be a bit iffy, as the radio gets upset (I think there's a watchdog timer). DMA SPI would be perfect, but there's a big in the nRF52's hardware which means that single-byte SPI writes fail via DMA, so to get it working I'll have to make a special SPI function that falls back to non-DMA for single byte transfers :( |
Ok, I understand - Dropped the idea of implementing NRF.neopixelWrite() |
Just FYI - I have this done now - just waiting to check on licensing of the code I'm using before I commit it. I'll be adding |
Wow - this is so cool - Thanks ! |
@gfwilliams Is there something you want me to change for ESPs ? |
Nope, it should be fine - I moved the code around so When I commit it'd be great if you could test though, just to make sure I didn't break anything :) |
sure, I can test |
ran some test - works perfect - thanks ! |
Great - thanks! |
One more point to add, this will cause confusion:
this function can not handle APA10X, because they need two data lines. |
It's unfortunate - I guess I'll have to spell out the part numbers individually, APA104 are fine: https://groups.google.com/forum/#!topic/atxhs-discuss/r_bGlXBZC-E - as are some other APAs as well |
This might be solved with the addition of: #695
But we need to test.
The text was updated successfully, but these errors were encountered: