Hello,
I am working with the following LED strip:
The setup I use is the same as in the description in the link. A capacitor on + and -, a resistor between pin 6 and the data line.
And I have some trouble controlling the LEDs, the code I use is down below. It does not send the correct data to the LEDs, each LED has a different color, and some LEDs are triggered multiple times. With NUM_LEDS 7, it uses 6 LEDs, and one LED is used twice with a different color.
I am using the latest version of FastLED: 3.5.0. This does not include the WS2813 LEDs. I have tried NEOPIXEL, WS2812, WS2812B, but this does not fix my problem.
Swapping the data wires with pin 6 and ground, or connecting both data wires to pin 6 also does nog fix my problem. I couldn't find other ways to fix it.
Does anyone have experience with this type of LED strip and knows how to fix it?
#include <FastLED.h>
#define NUM_LEDS 7
#define DATA_PIN 6
CRGB leds[NUM_LEDS];
void setup() {
// put your setup code here, to run once:
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
}
void loop() {
// put your main code here, to run repeatedly:
for (int dot = 0; dot < NUM_LEDS; dot++) {
leds[dot] = CRGB::Blue;
FastLED.show();
// clear this led for the next time around the loop
leds[dot] = CRGB::Black;
delay(500);
}
}