my problem is that when i connect the strip to the power supply, the first leds lights up nothing else and if i connect then my arduino uno to it and run this code( which should leed to let a light wander up and down the strip the whole strip just starts falshing in different colors.
#include "FastLED.h"
#define NUM_LEDS 1
#define DATA_PIN 3
#define CLOCK_PIN 13
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);
}
void loop() {
// Turn the LED on, then pause
leds[0] = CRGB::Red;
FastLED.show();
delay(500);
// Now turn the LED off, then pause
leds[0] = CRGB::Black;
FastLED.show();
delay(500);
}
Whandall:
There is no led set to white in your sketch, back does not work.
I tried this (with 60 leds) and it sends a single green led much faster back and forth.
#include "FastLED.h"
#define NUM_LEDS 300 #define DATA_PIN 6
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);
}
void loop() {
for (int i = 0; i < NUM_LEDS; i++)
{
leds[i] = CRGB::Red;
FastLED.show();
delay(50);
leds[i] = CRGB::Black;
}
for (int i = NUM_LEDS; i > 0 ; i--)
{
leds[i] = CRGB::Red;
FastLED.show();
delay(50);
leds[i] = CRGB::Black;
}
}
yeah i know i changed it in my posting after a few secs but you where too fast... ._. but at my strip my whole led strip i flashing in different colors if there were 1 led wander up and down i would be happy ... but like i said the whole strip is flashing ... (ps i think your strip is flashing green because you have GRB or GBR as led setup...