Hello,  I made a setup with an arduino nano(5V 16Mhz) and a  WS2812B ledstrip.

Hello,
I made a setup with an arduino nano(5V 16Mhz) and a WS2812B ledstrip.

I tried to make a rainbow:

#define LED_PIN 5
#define COLOR_ORDER GRB
#define CHIPSET WS2812
#define NUM_LEDS 120

#define BRIGHTNESS 200
#define FRAMES_PER_SECOND 50

CRGB leds[NUM_LEDS];
uint8_t gHue = 0; // rotating “base color” used by both patterns

void setup() {
delay(3000); // sanity delay
FastLED.addLeds<CHIPSET, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS).setCorrection( TypicalLEDStrip );
FastLED.setBrightness( BRIGHTNESS );

}

void loop()
{

fill_rainbow( leds, NUM_LEDS, gHue, 5);
gHue–;
FastLED.show(); // display this frame
FastLED.delay(1000 / FRAMES_PER_SECOND);
}

The result is: I don’t see any red in the rainbow and it is really,really slow and it flickers when it change to green.

Can you please give me some tips how to improve it.
Thanks

Flickering makes me wonder what you’re using for your power supply?

Do you see any speed difference if you change the FRAMES_PER_SECOND number?

According to Marc: “Flickering makes me wonder what you’re using for your power supply?”

Indeed. Especially if using a whopping 200 LED’s.

I’ll bet you don’t get the same flicker with 20 LED’s.

He has NUM_LEDS 120, not 200, but yes, that. What happens with NUM_LEDS 20 @Ernst_van_Spronsen ​?

If you run the cylon example with green does it run ok? With 20 LEDs? With all 120 LEDs?

I don’t know what happend. But again.

My powersupply is 5v/12A

I tested Cyclon it is not readfast but fast enough. only the leds are green and not red:
leds[i] = CRGB::Red;
This is my red: leds[i] = CRGB::Green;
So how do I change the collor order?

Only I assume my controller is to slow to calc a rainbow and display is. What is a faster alternative?

Thanks.

I tried to make red in my program:
for(int i = 0; i < NUM_LEDS; i++) {
// Set the i’th led to red
leds[i] = CRGB(255,0,0);
}
The result is yellow.
I played with: the order of: #define COLOR_ORDER GRB
But this is correct for the other collors. Very strange.

Your 5V 12A power supply is fine for 120 LEDs. So what else could be causing flickering… Do you have the ground from the strip connected to ground on the controller?

For the color order issue, have you run the RGB calibrate sketch?

The flicker is only with the rainbox. I think it is gHue going through zero.

I run RGBcalibrate. There is some green in my red.
Green + red = yellow.
So somehow green is always on.
leds[1] = CRGB(0,0,0); This also displays green.
So is there any collor correction functie?

Thanks!

As far as color correction goes, you can add the following to your definition:

FastLED.addLeds<LED_TYPE,LED_PIN,COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);

Instead of correcting to ‘TypicalLEDStrip’, see this link for alternatives:

Disclaimer: I don’t use this.

Sounds like something isn’t working if you’re not able to get the RGB colors to display correctly with the calibrate sketch. I would try to get that sorted out before going to much further with other stuff.