Hi to all members, nice to meet you!
i’m working on a project with 600/1200 led and teensy.
I have a problem with flickering of brightness when it is lower then 255, specially when they are stopped in one position and the data keeps coming.
I tried to use FastLED.setDither(0) without improvements.
Any suggest?
Another question: the data is many, is there any control I can put in the sketch to avoid bugs?
Thank you!
My sketch:
#include “FastLED.h”
int value = 10;
int i = 0;
int i2 = 0;
int i3 = 0;
int fade = 0;
#define NUM_LEDS_PER_STRIP 300
#define NUM_LEDS_PER_STRIP2 60
#define NUM_LEDS_PER_STRIP3 300
CRGB leds[NUM_LEDS_PER_STRIP];
CRGB leds2[NUM_LEDS_PER_STRIP2];
CRGB leds3[NUM_LEDS_PER_STRIP3];
void setup() {
Serial.begin(921600);
Serial.println(“resetting”);
FastLED.addLeds<WS2812B, 3>(leds, NUM_LEDS_PER_STRIP);
FastLED.addLeds<WS2812B, 10>(leds2, NUM_LEDS_PER_STRIP2);
FastLED.addLeds<WS2812B, 15>(leds3, NUM_LEDS_PER_STRIP3);
FastLED.setBrightness( 255 );
FastLED.setDither(0);
}
void loop() {
if (Serial.available()){
if ((i3 >= 0) && (i3 <= 299)){
value = Serial.read();
i = i3;
leds[i] = CRGB(value, value, value);
i3++;
}
if ((i3 >= 300) && (i3 <= 359)){
value = Serial.read();
i = i3-300;
leds2[i] = CRGB(value, value, value);
i3++;
}
if ((i3 >= 360) && (i3 <= 659)){
value = Serial.read();
i = i3-360;
leds3[i] = CRGB(value, value, value);
i3++;
}
if ( i3 == 660){
FastLED.show();
i3 = 0;
}
}
}