I have a simple 6-pointed star with 36 RGB pixels. I’m using an ARDUINO R3
to control. My test sketch is designed to turn each pixel on and off. It consists of three passes using the basic RED/GREEN/BLUE colors. GREEN and BLUE work as expected. RED, produces a random multi-color sequence instead of just RED. Have tried using “CRGB::color” and “.setRGB( x, x, x)” to set the colors. Both work fine with GREEN and BLUE but fail will RED. ???
ARDUINO Ver 1.8.5
FASTLed Ver 3.2.0
SKETCH:
#include <FastLED.h>
#define NUM_LEDS 37
#define DATA_PIN 6
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
}
void loop() {
for(int dot = 0; dot < NUM_LEDS; dot++) {
leds[dot].setRGB( 200, 0, 0); //Green
FastLED.show();
// clear this led for the next time around the loop
leds[dot].setRGB( 0, 0, 0); //Black;
if(dot == 0)
delay(500);
else
delay(50);
}
for(int dot = 0; dot < NUM_LEDS; dot++) {
leds[dot].setRGB( 0, 200, 0); //Red
FastLED.show();
// clear this led for the next time around the loop
leds[dot].setRGB( 0, 0, 0); //Black;
if(dot == 0)
delay(500);
else
delay(50);
}
for(int dot = 0; dot < NUM_LEDS; dot++) {
leds[dot].setRGB( 0, 0, 200); //BLUE
FastLED.show();
// clear this led for the next time around the loop
leds[dot].setRGB( 0, 0, 0); //Black;
if(dot == 0)
delay(500);
else
delay(50);
}
}