FastLED 3.9.3
Loading...
Searching...
No Matches
power_mgt.h
Go to the documentation of this file.
1#pragma once
2
3#include "FastLED.h"
4
5#include "pixeltypes.h"
6
9
10FASTLED_NAMESPACE_BEGIN
11
15
16
20
23void set_max_power_in_volts_and_milliamps( uint8_t volts, uint32_t milliamps);
24
27void set_max_power_in_milliwatts( uint32_t powerInmW);
28
32void set_max_power_indicator_LED( uint8_t pinNumber); // zero = no indicator LED
33
35
36
46
54void delay_at_max_brightness_for_power( uint16_t ms);
55
57
58
62
68uint32_t calculate_unscaled_power_mW( const CRGB* ledbuffer, uint16_t numLeds);
69
78uint8_t calculate_max_brightness_for_power_mW(const CRGB* ledbuffer, uint16_t numLeds, uint8_t target_brightness, uint32_t max_power_mW);
79
88uint8_t calculate_max_brightness_for_power_vmA(const CRGB* ledbuffer, uint16_t numLeds, uint8_t target_brightness, uint32_t max_power_V, uint32_t max_power_mA);
89
99uint8_t calculate_max_brightness_for_power_mW( uint8_t target_brightness, uint32_t max_power_mW);
100
102
103
105
106FASTLED_NAMESPACE_END
107
central include file for FastLED, defines the CFastLED class/object
void set_max_power_in_milliwatts(uint32_t powerInmW)
Set the maximum power used in watts.
void show_at_max_brightness_for_power()
Similar to CFastLED::show(), but pre-adjusts brightness to keep below the power threshold.
void delay_at_max_brightness_for_power(uint16_t ms)
Similar to CFastLED::delay(), but pre-adjusts brightness to keep below the power threshold.
uint32_t calculate_unscaled_power_mW(const CRGB *ledbuffer, uint16_t numLeds)
Determines how many milliwatts the current LED data would draw at max brightness (255)
Definition power_mgt.cpp:61
void set_max_power_in_volts_and_milliamps(uint8_t volts, uint32_t milliamps)
Set the maximum power used in milliamps for a given voltage.
void set_max_power_indicator_LED(uint8_t pinNumber)
Select a pin with an LED that will be flashed to indicate that power management is pulling down the b...
uint8_t calculate_max_brightness_for_power_vmA(const CRGB *ledbuffer, uint16_t numLeds, uint8_t target_brightness, uint32_t max_power_V, uint32_t max_power_mA)
Determines the highest brightness level you can use and still stay under the specified power budget f...
Definition power_mgt.cpp:91
uint8_t calculate_max_brightness_for_power_mW(const CRGB *ledbuffer, uint16_t numLeds, uint8_t target_brightness, uint32_t max_power_mW)
Determines the highest brightness level you can use and still stay under the specified power budget f...
Definition power_mgt.cpp:95
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:39