Power management now 1st class. Starting with FastLED 3.1.1 (basically, FastLED/master@HEAD- not quite rolled up into a release yet) the power management functions are “1st class citizens” of FastLED[1]. This means that now all you have to do to limit the power usage of your 5v leds is simply add:
FastLED.setMaxPowerInVoltsAndMilliamps(5,1000);
to your setup() function. FastLED.show() and FastLED.delay() will automatically use this power limit going forward.
Here’s to not blowing out our batteries too quickly or over drawing our power supplies and browning out!
(Note: this is a re-working of the power management code that @Mark_Kriegsman put in last year and works pretty much exactly the same way, just more automatically now. The old power management functions are still there, but are now marked as deprecated and simply call through to the FastLED methods).
[1] Why didn’t they start that way? I had concerns about the compiled code size for folks who weren’t using power management. Needless to say, I’ve worked around that. If you don’t set a max power usage, none of that code gets compiled in at all.