Set brightness at 10pm low and 8am high

This commit is contained in:
2022-12-31 10:56:35 +01:00
parent 5162083180
commit cadd97909d
+5 -2
View File
@@ -22,7 +22,7 @@
#include <ESP8266WebServer.h>
#include <WiFiManager.h>
#define BRIGHTNESS 200
// #define BRIGHTNESS 200
#define NUM_LEDS 43
#define DATA_PIN 5
@@ -94,6 +94,7 @@ uint8_t color = 0;
int lastmin = 100;
void printDigits(int digits);
void sendNTPpacket(IPAddress &address);
uint8_t BRIGHTNESS = 200;
void clear(bool show=true)
{
@@ -143,7 +144,7 @@ void digitalClockDisplay()
void setup()
{
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
clear();
for (int initcount=0; initcount <= NUM_LEDS; initcount++) {
clear();
@@ -312,6 +313,7 @@ void getHourWord()
Serial.println("sieben");
break;
case 8:
BRIGHTNESS = 200;
case 20:
set_word(H_ACHT);
Serial.println("acht");
@@ -323,6 +325,7 @@ void getHourWord()
break;
case 10:
case 22:
BRIGHTNESS = 50;
set_word(H_ZEHN);
Serial.println("zehn");
break;