WS2811 LED Light Strips not working

Hello everyone,

I recently bought WS2811 LED Light strips, but I am unable to get them to work properly.

Pic1|690x345

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:

#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()
{
    
}

Hardware:
Arduino Nano
12v 5a Power Supply
WS2811 LED Strips

Thanks for your time.

  leds[0] = CRGB::Red;
  leds[1] = CRGB::Blue;
  leds[2] = CRGB::Green;
  FastLED.show();              // <---------<<<<<<<<

@LarryD,

Thanks for replying. I tried " FastLED.show(); " in my code, but now it is just showing random colors in different sections of the LED strip. Do you see anything in my new program that might be causing this issue?

My code:

#include <Arduino.h>
#include "FastLED.h"

#define DATA_PIN 2
#define NUM_LEDS 60

CRGB leds[NUM_LEDS];


void setup()
{
    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;
    FastLED.show();
}


void loop()
{

}

Thanks.

Show us a good schematic of your circuit.

Show us a good image of your ‘actual’ wiring.

Give links to components.

How is the strip powered ?

@LarryD,

The strip is powered with a 12v 5a power supply. The WS2811 LED strips were bought off of Ebay (WS2812B 30/60/144led/m Ws2811 WS2813 WS2815 Smart RGB Led Light Strip DC5V DC12V | eBay). I am also using a genuine Arduino Nano from the Arduino store. Here is a picture of my circuit, this forum will only let me post one pic.

Pic #2,

Pic #3,

You need a common GND between the Arduino and the LED strip.

@LarryD,

YES!!! I got them working, thank you so much for your help!!!