Arduinnno crshes with LPD8806

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
BuggsBunny
 
Posts: 1
Joined: Fri Oct 11, 2013 5:51 pm

Arduinnno crshes with LPD8806

Post by BuggsBunny »

Hi,

I'm having a problem with an Arduino Duemilanove and the 32 LED strip with LPD8806. I'm running the following code:

Code: Select all

#define BUFFERSIZE 127
uint8_t inBuffer[BUFFERSIZE];
int i;
int iPos;
int nLEDs = 32;
LPD8806 strip = LPD8806(nLEDs);

...
          for (i=0; i < nLEDs; i++) {
            strip.setPixelColor(i, strip.Color(inBuffer[iPos + 1], inBuffer[iPos + 2], inBuffer[iPos + 3]));
          }
          strip.show();
...
It does what it's supposed to do and sets all LEDs to one color; however, eventually, latest when this ran several times, the strip begins to flicker and the board crashes. Could that have to do with the clocking of the chips and if yes, how can I change that? Or is this something else?

thanks and happy programing,
Buggs

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Arduinnno crshes with LPD8806

Post by adafruit_support_rick »

Sounds like it could be a bug in your sketch. Try running the example code and see if you observe similar failures

ericgu
 
Posts: 58
Joined: Mon Oct 18, 2010 11:24 pm

Re: Arduinnno crshes with LPD8806

Post by ericgu »

Without knowing what is in the "..." sections, it's hard to tell.

One thing that could easily crash the board is if you are setting values into inBuffer that are bigger than the size of the buffer.

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”