Set brightness at 10pm low and 8am high
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
#include <ESP8266WebServer.h>
|
#include <ESP8266WebServer.h>
|
||||||
#include <WiFiManager.h>
|
#include <WiFiManager.h>
|
||||||
|
|
||||||
#define BRIGHTNESS 200
|
// #define BRIGHTNESS 200
|
||||||
|
|
||||||
#define NUM_LEDS 43
|
#define NUM_LEDS 43
|
||||||
#define DATA_PIN 5
|
#define DATA_PIN 5
|
||||||
@@ -94,6 +94,7 @@ uint8_t color = 0;
|
|||||||
int lastmin = 100;
|
int lastmin = 100;
|
||||||
void printDigits(int digits);
|
void printDigits(int digits);
|
||||||
void sendNTPpacket(IPAddress &address);
|
void sendNTPpacket(IPAddress &address);
|
||||||
|
uint8_t BRIGHTNESS = 200;
|
||||||
|
|
||||||
void clear(bool show=true)
|
void clear(bool show=true)
|
||||||
{
|
{
|
||||||
@@ -143,7 +144,7 @@ void digitalClockDisplay()
|
|||||||
|
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
|
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
|
||||||
clear();
|
clear();
|
||||||
for (int initcount=0; initcount <= NUM_LEDS; initcount++) {
|
for (int initcount=0; initcount <= NUM_LEDS; initcount++) {
|
||||||
clear();
|
clear();
|
||||||
@@ -312,6 +313,7 @@ void getHourWord()
|
|||||||
Serial.println("sieben");
|
Serial.println("sieben");
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
|
BRIGHTNESS = 200;
|
||||||
case 20:
|
case 20:
|
||||||
set_word(H_ACHT);
|
set_word(H_ACHT);
|
||||||
Serial.println("acht");
|
Serial.println("acht");
|
||||||
@@ -323,6 +325,7 @@ void getHourWord()
|
|||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
case 22:
|
case 22:
|
||||||
|
BRIGHTNESS = 50;
|
||||||
set_word(H_ZEHN);
|
set_word(H_ZEHN);
|
||||||
Serial.println("zehn");
|
Serial.println("zehn");
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user