I recently purchased an Uno with aspirations of taking over the world. My first project I selected as the dumbest most simple thing I could think up - a 27 LED WS2811 strip. I spent the last two days reading up on how to control an addressable LED strip, and then finally today I gave it a shot. Complete failure. I've upgraded numerous snippets of code, as well as the most basic code I could find just to get the strip to turn a color, any color. All that happens is my strip is permanently illuminated white and does absolutely nothing no matter what I do.
Here is the code I'm running:
#include <Adafruit_NeoPixel.h>
// Which pin on the Arduino is connected to the NeoPixels?
#define PIN 6
// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 27
// 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_RGB + NEO_KHZ400);
int delayval = 1500; // delay for half a second
void setup() {
pixels.begin(); // This initializes the NeoPixel library.
}
void loop() {
// For a set of NeoPixels the first NeoPixel is 0, second is 1, all the way up to the count of pixels minus one.
for(int i=0;i<NUMPIXELS;i++){
// pixels.Color takes RGB values, from 0,0,0 up to 255,255,255
pixels.setPixelColor(i, pixels.Color(0,150,0)); // Moderately bright green color.
pixels.show(); // This sends the updated pixel color to the hardware.
delay(delayval); // Delay for a period of time (in milliseconds).
}
}
I've tried changing the data rate, the RGB/GBR settings, etc. Literally everything has resulted in a white LED strip.
These are the LED's I am using:
Any advice?