-
Notifications
You must be signed in to change notification settings - Fork 68
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
Incompatibility between digiusb and Adafruit NeoPixel #4
Comments
Please try the WS2812 library also included with the Digistump IDE - On Tue, Mar 31, 2015 at 5:24 AM, Honos2014 notifications@github.com wrote:
|
I did managed to make it run with both NeoPixel and DigiCDC. Ram doesn't seems to be the issue. |
I have found the ws2812 lib. Testing it... void setup() { void loop() { void setPixel(i,r,g,b){ void updatePixels(){ Note: In the folder of WS2812 there is a ws2812.h but no ws2812.c |
This happens to me, too. The repro steps are simple:
I thought that the mere inclusion of a .h meant that DigiUSB.h was redefining something that conflicted with the NeoPixel library. But then I noticed that the .h externs an instance of the DigiUSBDevice class, which contains two monstrously large ring buffers. An an experiment I tried changing For my application, I'm using just one WS2812, so expect that I've already shrunk the NeoPixel instance as much as I can. I don't yet understand the ramifications of a smaller ring buffer. I bet it has to do with dropped characters if my application doesn't read the buffer frequently enough (on either side). I think this is OK in my case, but it might be annoying in other cases. TL;DR: try shrinking the DigiUSB ring buffer sizes if you're getting conflicts. |
In case anyone finds this still relevant, I had the same issue. |
Hello there,
I can drive a NeoPixel with the digispark with no problem.
I can use the digiUSB with ease and everything is fine.
But I cannot use both.
include <Adafruit_NeoPixel.h>
//#include <DigiUSB.h>
For the NeoPixel to work I cannot include the DigiUSB lib...
When I compiled the program with both libs it uses 58% of the ram.
Any suggestion?
Thank you
The text was updated successfully, but these errors were encountered: