You can now set LED_MAX_MILLIAMPS if your power supply is limited.

This commit is contained in:
Fabian Schlenz 2019-06-12 20:48:56 +02:00
parent f8c696c384
commit ca980b0c9f
2 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,7 @@
#define COLOR_ORDER GRB // Order of the colors of the LEDs. If you get unexpected colors, you should change this.
#define BRIGHTNESS 20 // Default brightness of the LEDs. 1 (lowest)-255 (brightest)
#define TEMPORAL_DITHERING 0 // Use temporal dithering. Can lead to flickering.
#define LED_MAX_MILLIAMPS 0 // If your power supply is too small, you can set this to a maximum mA value. FastLED should then honor this. Setting it to 0 disables this limit.
#define NTP_SERVER "pool.ntp.org" // NTP server to use to fetch the current time
#define NTP_INTERVAL 300000 // Interval in ms to update the time from the NTP server. 300000 ms = 5 minutes

View File

@ -6,4 +6,7 @@ void fastled_setup() {
FastLED.addLeds<LED_TYPE,DATA_PIN,COLOR_ORDER>(leds, LED_COUNT).setCorrection(TypicalLEDStrip);
FastLED.setBrightness(BRIGHTNESS);
FastLED.setDither(TEMPORAL_DITHERING);
if (LED_MAX_MILLIAMPS > 0) {
FastLED.setMaxPowerInVoltsAndMilliamps(5, LED_MAX_MILLIAMPS);
}
};