FastLED  3.1
Power management functions

functions used to limit the amount of power used by FastLED More...

Functions

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. More...
 
void set_max_power_in_milliwatts (uint32_t powerInmW)
 Set the maximum power used in watts.
 
void set_max_power_indicator_LED (uint8_t pinNumber)
 Select a ping with an led that will be flashed to indicate that power management is pulling down the brightness. More...
 
void show_at_max_brightness_for_power ()
 Similar to FastLED.show, but pre-adjusts brightness to keep below the power threshold. More...
 
void delay_at_max_brightness_for_power (uint16_t ms)
 Similar to FastLED.delay, but pre-adjusts brightness to keep below the power threshold. More...
 
uint32_t calculate_unscaled_power_mW (const CRGB *ledbuffer, uint16_t numLeds)
 calculate_unscaled_power_mW tells you how many milliwatts the current LED data would draw at brightness = 255.
 
uint8_t calculate_max_brightness_for_power_mW (const CRGB *ledbuffer, uint16_t numLeds, uint8_t target_brightness, uint32_t max_power_mW)
 calculate_max_brightness_for_power_mW tells you the highest brightness level you can use and still stay under the specified power budget for a given set of leds. More...
 
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)
 calculate_max_brightness_for_power_mW tells you the highest brightness level you can use and still stay under the specified power budget for a given set of leds. More...
 
uint8_t calculate_max_brightness_for_power_mW (uint8_t target_brightness, uint32_t max_power_mW)
 calculate_max_brightness_for_power_mW tells you the highest brightness level you can use and still stay under the specified power budget. More...
 

Detailed Description

functions used to limit the amount of power used by FastLED

Function Documentation

uint8_t calculate_max_brightness_for_power_mW ( const CRGB ledbuffer,
uint16_t  numLeds,
uint8_t  target_brightness,
uint32_t  max_power_mW 
)

calculate_max_brightness_for_power_mW tells you the highest brightness level you can use and still stay under the specified power budget for a given set of leds.

It takes a pointer to an array of CRGB objects, a count, a 'target brightness' which is the brightness you'd ideally like to use, and the max power draw desired in milliwatts. The result from this function will be no higher than the target_brightess you supply, but may be lower.

Definition at line 84 of file power_mgt.cpp.

uint8_t calculate_max_brightness_for_power_mW ( uint8_t  target_brightness,
uint32_t  max_power_mW 
)

calculate_max_brightness_for_power_mW tells you the highest brightness level you can use and still stay under the specified power budget.

It takes a 'target brightness' which is the brightness you'd ideally like to use. The result from this function will be no higher than the target_brightess you supply, but may be lower.

Definition at line 100 of file power_mgt.cpp.

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 
)

calculate_max_brightness_for_power_mW tells you the highest brightness level you can use and still stay under the specified power budget for a given set of leds.

It takes a pointer to an array of CRGB objects, a count, a 'target brightness' which is the brightness you'd ideally like to use, and the max power in volts and milliamps. The result from this function will be no higher than the target_brightess you supply, but may be lower.

Definition at line 80 of file power_mgt.cpp.

void delay_at_max_brightness_for_power ( uint16_t  ms)

Similar to FastLED.delay, but pre-adjusts brightness to keep below the power threshold.

Deprecated:
this has now been rolled into FastLED.delay();

Definition at line 180 of file power_mgt.cpp.

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.

Deprecated:
  • use FastLED.setMaxPowerInVoltsAndMilliamps()

Definition at line 164 of file power_mgt.cpp.

void set_max_power_indicator_LED ( uint8_t  pinNumber)

Select a ping with an led that will be flashed to indicate that power management is pulling down the brightness.

Deprecated:
  • use FastLED.setMaxPowerInMilliWatts

Definition at line 159 of file power_mgt.cpp.

void show_at_max_brightness_for_power ( )

Similar to FastLED.show, but pre-adjusts brightness to keep below the power threshold.

Deprecated:
this has now been moved to FastLED.show();

Definition at line 174 of file power_mgt.cpp.