#include <FastLED.h>
// How many leds in your strip?
#define NUM_LEDS 2
#define DATA_PIN 7
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS);
}
void loop() {
FastLED.setBrightness(128);
leds[0] = CRGB::Red;
FastLED.show();
delay(1000);
// Now turn the LED off, then pause
leds[1] = CRGB(255,0,0);
FastLED.show();
delay(1000);
// Now turn the LED off, then pause
leds[0] = CRGB::White;
FastLED.show();
delay(1000);
// Now change LED, then pause
leds[1] = CRGB::Green;
FastLED.show();
delay(1000);
// Now LED, then pause
leds[0] = CRGB::Black;
FastLED.show();
delay(500);
// Now turn the LED off, then pause
leds[0] = CRGB::Black;
FastLED.show();
delay(1000);
}
Your diagram shows that you are trying to power this through your Arduino and its USB connection. Then, you changed it to it's own power supply, tell us about this power supply.
Is the nano still responding to the IDE?
Also, a picture of the connection would be helpful.
Do you have a multimeter to check if you really have 5V at the LED strip? You may be getting a voltage drop. You can also use a multimeter to check the other connections.
USB can't provide enough current for 50 LEDs, although it might be OK depending on how many LEDs & colors are on at a time.
You can figure 20mA per-led, per-color, so worst case 60mA per RGB LED or 3 Amps for 50 LEDs. It's "good practice" to design for worst case even if you don't intend to run all LEDs at full-brightness white, but you can "fudge" a bit.
USB is good for about 1 Amp and you shouldn't run more than about 1A through a breadboard.
I think the 5V power also goes-through a chip on the Nano board, and that's probably limiting the current even more.
It's possible that the LED strip is simply defective. The data is serial so if the 1st chip/LED is bad it can kill the whole strip.
There's a socket on one end and a plug (pins in) at the other.
On mine, the data goes in the socket.
Do the circuit boards with yours have the big arrow like mine?
You may have damaged the first LED in the string. Consider doing a return/exchange. Use a quality 5V >3A power supply. Hot to red, Ground to white and to Arduino ground, and green to Arduino data pin.