FastLED 3.6.0
Loading...
Searching...
No Matches
power_mgt.h
Go to the documentation of this file.
1#ifndef POWER_MGT_H
2#define POWER_MGT_H
3
4#include "FastLED.h"
5
6#include "pixeltypes.h"
7
10
11FASTLED_NAMESPACE_BEGIN
12
16
17
21
24void set_max_power_in_volts_and_milliamps( uint8_t volts, uint32_t milliamps);
25
28void set_max_power_in_milliwatts( uint32_t powerInmW);
29
33void set_max_power_indicator_LED( uint8_t pinNumber); // zero = no indicator LED
34
36
37
47
55void delay_at_max_brightness_for_power( uint16_t ms);
56
58
59
63
69uint32_t calculate_unscaled_power_mW( const CRGB* ledbuffer, uint16_t numLeds);
70
79uint8_t calculate_max_brightness_for_power_mW(const CRGB* ledbuffer, uint16_t numLeds, uint8_t target_brightness, uint32_t max_power_mW);
80
89uint8_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);
90
100uint8_t calculate_max_brightness_for_power_mW( uint8_t target_brightness, uint32_t max_power_mW);
101
103
104
106
107FASTLED_NAMESPACE_END
108
109#endif
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:60
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:90
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:94
Definitions for pixel color data structs.
Representation of an RGB pixel (Red, Green, Blue)
Definition pixeltypes.h:120