I recently bought WS2811 LED Light strips, but I am unable to get them to work properly.
As you can see from the photo above, the LED strip is red at one tip without any interaction from the Arduino Nano. I'm not sure if I just got a bad strip or if my code is not written right.
Here is my code:
Code: Select all
#include <Arduino.h>
#include "FastLED.h"
#define DATA_PIN 2
#define NUM_LEDS 60
CRGB leds[NUM_LEDS];
void setup()
{
Serial.begin(115200);
FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS);
FastLED.setBrightness(255);
FastLED.clear();
leds[0] = CRGB::Red;
leds[1] = CRGB::Blue;
leds[2] = CRGB::Green;
}
void loop()
{
}
Arduino Nano
12v 5a Power Supply
WS2811 LED Strips
Thanks for your time.