I purchased one of these and have been having problems getting it to behave on my Uno. I purchased it with the controller listed in the auction so I could test it and make sure it was my code and not the strip. The demo displays that come with the controller box light everything up fine.
Even a basic sample like this just lights all of the LED's up as white:
#include "LPD8806.h"
#include "SPI.h"
int nLEDs = 240;
int dataPin = 2;
int clockPin = 3;
LPD8806 strip = LPD8806(nLEDs, dataPin, clockPin);
void setup() {
// Start up the LED strip
strip.begin();
// Update the strip, to start they are all 'off'
strip.show();
}
void loop() {
colorChase(strip.Color(127, 0, 0), 100); // Red
colorChase(strip.Color( 0,127, 0), 100); // Green
colorChase(strip.Color( 0, 0,127), 100); // Blue
colorChase(strip.Color(127,127,127), 100); // White
}
// Chase one dot down the full strip. Good for testing purposes.
void colorChase(uint32_t c, uint8_t wait) {
int i;
// Start by turning all pixels off:
for(i=0; i<strip.numPixels(); i++) strip.setPixelColor(i, 0);
// Then display one pixel at a time:
for(i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, c); // Set new pixel 'on'
strip.show(); // Refresh LED states
strip.setPixelColor(i, 0); // Erase pixel, but don't refresh!
delay(wait);
}
strip.show(); // Refresh to turn off last pixel
}
Any ideas?
Thanks
dave