fix light flash at first toggle

This commit is contained in:
interfisch 2019-10-12 17:11:53 +02:00
parent 4995e2a69e
commit f3362835aa
1 changed files with 4 additions and 4 deletions

View File

@ -61,14 +61,14 @@ float set_brightness=0; //0 to 1
#define BRIGHTNESS_MIN 0.0
#define BRIGHTNESS_MAX 2.0 //if temperature is in between both strips brightness of 2 means both are at full power. otherwise brightness will be clipped
float brightness=set_brightness;
float brightness_change_per_loop=100; //will be calculated by Handler
float brightness_change_per_loop=0; //will be calculated by Handler
#define TEMPERATURE_MIN 2760 //temperature of warm white leds
#define TEMPERATURE_MAX 5640//temperature of cold white leds
float set_temperature=(TEMPERATURE_MAX+TEMPERATURE_MIN)/2;
float temperature=set_temperature;
float temperature_change_per_loop=100; //will be calculated by Handler
float temperature_change_per_loop=0; //will be calculated by Handler
uint16_t fadetime=0; //0=instant. value is time in milliseconds
#define FADETIME_MIN 0
@ -103,8 +103,8 @@ void setup() {
Serial.println("Hello");
pinMode(LED_WW, OUTPUT);
pinMode(LED_CW, OUTPUT);
digitalWrite(LED_CW, HIGH); //high = off
digitalWrite(LED_WW, HIGH); //high = off
analogWrite(LED_CW, PWM_MAX); //high = off
analogWrite(LED_WW, PWM_MAX); //high = off
pinMode(BTN_A, INPUT);
pinMode(BTN_B, INPUT);