0

I'm unable to access the first led in my strip with this code:

void loop()
{
  leds[0] = CRGB::White; FastLED.show(); delay(100);
  leds[0] = CRGB::Black; FastLED.show(); delay(100);
}

Instead, it blinks 3 leds, though I expect it to blink only the first one.

enter image description here

Here's how my setup code looks like:

#define DATA_PIN    1
#define CLK_PIN   5
#define LED_TYPE    WS2812B
#define COLOR_ORDER RGB
#define NUM_LEDS    60
CRGB leds[NUM_LEDS];

#define BRIGHTNESS          10

void setup() {
  delay(1000); // Power-up delay

  // tell FastLED about the LED strip configuration
  FastLED.addLeds<LED_TYPE,DATA_PIN,COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);

  // set master brightness control
  FastLED.setBrightness(BRIGHTNESS);
}

The led was bought from here: https://www.aliexpress.com/item/0-5-5M-30-60-LEDs-M-2811-Pixels-Programmable-Individual-Addressable-LED-Strip-light-WS2811/32849630888.html?spm=a2g0s.9042311.0.0.8e664c4dU4dru2

  • Dude, you own a WS2811 led strip, NOT a WS2812B. You need to know how to program this kind of led strip, but the line you want to change is this one: #define LED_TYPE WS2812B – k.Cyborg Nov 26 '18 at 19:08
  • If you look at the video in your link carefully, you'll see that as per answer below, as much as the description says the LED are individually controlled, they are in fact controlled in groups of 3 – Jaromanda X Nov 26 '18 at 20:36
  • @k.Cyborg tried that as well, didn't help – Andrey Gordeev Nov 27 '18 at 4:06
5

The description in the link of where you bought the strip says:

Description:

  1. LED Type: 5050SMD with External IC WS2811 (1 IC control 3leds)

So, this is probably as intended.

Note the application circuits in the datasheet for the controller IC (WS2811) [Page 5] where, for 5V, you can address a single LED, but for a 12V configuration, you must group the LEDs in sets of 3.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.