I was trying a very simple test with a 30 LED / 1m neopixel strip and a 5v trinket.
I decided to see what would happen if I blink the '0' led on/off and I noticed other LEDs randomly displaying. I took a video at the link below so you could see what I mean. Is there something I can do to make it more deterministic?
http://www.youtube.com/watch?v=-pEfDKotZlw
BTW - to keep the strip from having the 'whiteout' problem I had to add a 10k resistor in series with the data line. A diode nor a 470 ohm resistor ( uber guide) worked.
The sketch is below
Code: Select all
// NeoPixel Ring simple sketch (c) 2013 Shae Erisson
// released under the GPLv3 license to match the rest of the AdaFruit NeoPixel library
#include <Adafruit_NeoPixel.h>
// Which pin on the Arduino is connected to the NeoPixels?
#define PIN 2
// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 30
// When we setup the NeoPixel library, we tell it how many pixels, and which pin to use to send signals.
// Note that for older NeoPixel strips you might need to change the third parameter--see the strandtest
// example for more information on possible values.
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
int delayval = 500; // delay for half a second
void setup() {
pixels.begin(); // This initializes the NeoPixel library.
}
void loop() {
pixels.setPixelColor(0, pixels.Color(0,150,0));
pixels.show();
delay(delayval);
pixels.setPixelColor(0, pixels.Color(0,0,0));
pixels.show();
delay(delayval);
}
Pat