switched to linear phase balance
This commit is contained in:
parent
a0f6a5aec3
commit
a9f098097c
@ -1 +1 @@
|
|||||||
Subproject commit a70be39257e317d35e9118b385006a1e030e6452
|
Subproject commit 2edc89a3a9926c9ae870a69933696b3933f6c520
|
@ -139,10 +139,12 @@ void Treppe::setup(){
|
|||||||
// Deactive PCA9685 Phase Balancer due to LED Flickering
|
// Deactive PCA9685 Phase Balancer due to LED Flickering
|
||||||
// https://github.com/NachtRaveVL/PCA9685-Arduino/issues/15
|
// https://github.com/NachtRaveVL/PCA9685-Arduino/issues/15
|
||||||
// see also lib/PCA9685-Arduin/PCA9685.h:204
|
// see also lib/PCA9685-Arduin/PCA9685.h:204
|
||||||
pwmController.init(PCA9685_PhaseBalancer_None);
|
//pwmController.init(PCA9685_PhaseBalancer_None);
|
||||||
pwmController.setPWMFrequency(200);
|
pwmController.init(PCA9685_PhaseBalancer_Linear);
|
||||||
|
pwmController.setPWMFrequency(100);
|
||||||
pwmController.setAllChannelsPWM(idle_brightness);
|
pwmController.setAllChannelsPWM(idle_brightness);
|
||||||
|
|
||||||
|
pinMode(A0, INPUT);
|
||||||
pinMode(SENSOR1, INPUT);
|
pinMode(SENSOR1, INPUT);
|
||||||
pinMode(SENSOR2, INPUT);
|
pinMode(SENSOR2, INPUT);
|
||||||
pinMode(OE, OUTPUT);
|
pinMode(OE, OUTPUT);
|
||||||
@ -196,6 +198,8 @@ void Treppe::task(){
|
|||||||
last_sensor_state[1] = current_sensor_state[1];
|
last_sensor_state[1] = current_sensor_state[1];
|
||||||
|
|
||||||
ledsequence();
|
ledsequence();
|
||||||
|
|
||||||
|
Serial.printf("LDR raw: %d\n", analogRead(A0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ private:
|
|||||||
uint8_t stairs;
|
uint8_t stairs;
|
||||||
uint16_t time_per_stair = 300; // dimmtime per stair [ms]
|
uint16_t time_per_stair = 300; // dimmtime per stair [ms]
|
||||||
uint16_t idle_brightness = 0;
|
uint16_t idle_brightness = 0;
|
||||||
uint16_t active_brightness = 500;
|
uint16_t active_brightness = 3000;
|
||||||
|
|
||||||
uint8_t direction = 0;
|
uint8_t direction = 0;
|
||||||
uint8_t switch_direction = 0;
|
uint8_t switch_direction = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user