I’m wondering if there is a FastLED function or code to fade the brightness in a more human view-able fashion.
To elaborate, I’m working on a project where I want the LEDs to pulsate between 255 and 0. These are slow pulses lasting about 7 seconds. The issue I’m having is that brightness changes above - say 50 are much less noticeable than those below 50. So the pulses get bright very quickly and then stay bright too long.
What I need is some sort of scaling factor so the lower brightness changes occur slower and the brighter ones occur faster. This should result in a more linear looking pulse.
Here’s the code I’m currently using, it just ramps up from 0 to (about) 250 and back down. My gFadeAmount is set to 2.
Inside void loop()
delay(25);
brightness = brightness + gFadeAmount;
if (brightness == 0 || brightness > 250) { gFadeAmount = -gFadeAmount; }
FastLED.setBrightness(brightness);
FastLED.show();
Any thoughts would be appreciaed.
Thanks!