FastLed for white only led strip

Hello, I'm trying to control a LED strip that's only white (no rgb leds) with FastLed but I cannot seem to even shutdown all the lights on the strip. Did anyone tried this? or I should get an rgb strip :slight_smile:

Welcome to the forum

If the LED strip has only got while LEDs then why try to use FastLED when all you can do is to turn the whole strip on or off or control how bright it is using a PWM pin ?

What are you trying to do ?

I'm trying to get that "Chasing Running Water Light" effect. the strip should light up progressively and shut down the same way.
https://www.aliexpress.com/item/1005004085502467.html?spm=a2g0o.order_list.order_list_main.5.fdbc1802PfvH6c
This is the model

Thanks for the link

If the strip really is WS2811 compatible then you should be able to to control it with FastLED. I note that the LED voltage is 24V

Please post your test sketch and a schematic of your project show how power is supplied to its components

#include <FastLED.h>
// How many leds are in the strip?
#define NUM_LEDS 135
#define DATA_PIN 13

// This is an array of leds.  One item for each led in your strip.
CRGB leds[NUM_LEDS];

void setup() {
   	delay(2000);

    FastLED.addLeds<WS2811, DATA_PIN>(leds, NUM_LEDS);
    FastLED.clear();
}

void loop() {
  int whiteLed = 3;
  leds[whiteLed] = CRGB::Green;
  leds[whiteLed] = CRGB::Red;
  leds[whiteLed] = CRGB::Blue;

  FastLED.show();
}

Try a different data pin

Have you tried setting the led to White instead of Gren, Red or Blue ?

Yeap... it just lights up ramdomly...

can't even seem to shut them all off....

evrika!!!
so, given the fact that ws2811 has 3 outputs for RGB, the white only led strip has 15 leds per segment, so 5 leds are connected to each one of those 3 outputs.
the number of leds in arduino code must be the actual number of leds divided by 15.

leds[0] = CRGB::Red; this will light up the first 5 leds

leds[0] = CRGB::White; will light up the first 15 leds

also, connecting the arduino ground to my power source ground helped with the randomness.

maybe this will help someone with white inly strip :slight_smile:

#include <FastLED.h>

#define NUM_LEDS 135/15
#define DATA_PIN 12

CRGB leds[NUM_LEDS];

void setup() {
  FastLED.addLeds<WS2811, DATA_PIN>(leds, NUM_LEDS);
  FastLED.clear();
}

void loop() {
  for (byte i = 0; i < NUM_LEDS; i++) {
    leds[i] = CRGB::Green;
    FastLED.show();
    delay(10);
    leds[i] = CRGB::Red;
    FastLED.show();
    delay(10);
    leds[i] = CRGB::Blue;
    FastLED.show();
    delay(10);
  }
  for (byte i = 0; i < 3; i++) {
    fill_solid(leds[0], NUM_LEDS, CRGB( 255, 255, 255));
    FastLED.show();
    delay(1000);
    fill_solid(leds[0], NUM_LEDS, CRGB( 0, 0, 0));
    FastLED.show();
    delay(1000);
  }
}

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.