-
Notifications
You must be signed in to change notification settings - Fork 358
Open
Description
Great Library which gives me all the options I was looking for!
Especially dealing with segments is very convenient.
However the setBrightness()
method seems to be very slow.
At least I fail to smoothly change the brightness of the pixels
using this function. Here every 10 milliseconds.
Variable the_bright
is a value I read from an ambient light sensor.
void NeoPixelArray::loop(int dim_time) {
unsigned long the_millis = millis();
if((the_millis - update_time) >= 10) {
if (dim_time == 0) {
the_bright = bright;
ws2812fx->setBrightness(the_bright);
} else if(the_bright < bright) {
the_bright++;
ws2812fx->setBrightness(the_bright);
} else if(the_bright > bright) {
the_bright--;
ws2812fx->setBrightness(the_bright);
}
update_time = the_millis;
ws2812fx->service();
}
Any ideas?
Metadata
Metadata
Assignees
Labels
No labels