WS2812B Wiring and Code Validation

Hi Everyone!

I just recently bought an Arduino and successfully managed to get a single LED to blink! I decided to move on to something slightly more complex. So I cut off 6 segments of a WS2812B and attempted to make some magic by powering it through the USB (to keep things simple). I can't seem to get anything to happen and I believe all of my connections are in the right place. I've pulled from the example code and changed the location of the pin output.

I also added a few lines to blink the on-board LED to make sure that the sketch was properly pushed (and it was :slight_smile: )

Additionally, I decided to remove the signal wire and attach a single LED to the output and grounded it to the GRD pin. It pulls a current which eliminates the output pin or ground pin being damaged. At which point I'm led to believe it has to do with the +5V pin.

I don't necessarily think the nano is damaged. More so I have a lack of understanding of how to properly utilize the 5V pin.

I'm not really sure how to troubleshoot from here. Does anyone have any suggestions?
Thanks!

I've attached pictures and code just in case

#include <FastLED.h>

// How many leds in your strip?
#define NUM_LEDS 6
#define DATA_PIN 13

// Define the array of leds
CRGB leds[NUM_LEDS];

void setup() { 
      
      FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS);
      pinMode(LED_BUILTIN, OUTPUT);
    
}


void loop() { 
  
  // Turn the LED on, then pause
  leds[0] = CRGB::Red;
  FastLED.show();
  digitalWrite(LED_BUILTIN, HIGH);
  delay(500);
  
  // Now turn the LED off, then pause
  leds[0] = CRGB::Black;
  FastLED.show();
  digitalWrite(LED_BUILTIN, LOW);
  delay(500);
  
}

That all looks OK. I had to look at every photo closely as the perspective makes it difficult to identify which pin is on which row. For a while it looked like you had the red wire on the same row as the RST pin, which obviously wouldn't work.

If you don't already have a multimeter, buy one. The cheapest cheap one from the cheap tools store is more than you will need for 99% of all the Arduino projects in your future. Check you have 5V on the pin that you think you have. Check on the bare pads part-way down the strip if there's 5V there.

MorganS:
If you don't already have a multimeter, buy one.

Just ordered one and it should arrive tomorrow! Hopefully that will point to the source.

In the mean time, should I try putting anything in between a resistor, capacitor, or any other component in series of the signal wire? Not sure what the implications of either would be.

I notice you use pin 13 for the data output - that's also the pin that's connected to the internal LED. This may affect the signal you try to send to the strip. Try another pin (any of 3-12).

It's also generally recommended to place a small resistor (220Ω or so) in between the digital pin and the data in of the LED strip. When I tried this, it didn't work any more...