I have a simple 6-pointed star with 36 RGB pixels.

fastled-support
gplus
(Mike Ridgley) #1

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);
}
}

(Ken White) #2

@Mike_Ridgley - You should run the RGBCalibrate.ino sketch to determine what the RGB ordering for your chipset should be. You can find RGBCalibrate.ino in the examples for FastLED. In the Arduino IDE, click file -> examples -> FastLED -> RGBCalibrate and run this sketch for your LEDs.

Also, do you have RGB NeoPixels or RGBW NeoPixels? Do all of your pixels light up? Does one side of each LED have a large yellow part? FastLED does not support RGBW NeoPixels.

Finally, does your Uno and your NeoPixel strip share a common ground?

(Marc Miller) #3

Your code has NUM_LEDS listed as 37?