Browse Source

back to normal

tags/FSM1.0
Dominik Bartsch 3 years ago
parent
commit
5b197288bc
3 changed files with 6 additions and 7 deletions
  1. 1
    1
      lib/PCA9685-Arduino
  2. 2
    3
      lib/treppe/treppe.cpp
  3. 3
    3
      lib/treppe/treppe.h

+ 1
- 1
lib/PCA9685-Arduino

Subproject commit 2edc89a3a9926c9ae870a69933696b3933f6c520
Subproject commit 23e06c06a6026801a856141f64a6de54dd493b47

+ 2
- 3
lib/treppe/treppe.cpp View File

// 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_Linear);
pwmController.init(PCA9685_PhaseBalancer_None);
//pwmController.init(PCA9685_PhaseBalancer_Linear);
pwmController.setPWMFrequency(100); pwmController.setPWMFrequency(100);
pwmController.setAllChannelsPWM(idle_brightness); pwmController.setAllChannelsPWM(idle_brightness);
ledsequence(); ledsequence();


Serial.printf("LDR raw: %d\n", analogRead(A0));
} }





+ 3
- 3
lib/treppe/treppe.h View File



#include "PCA9685.h" #include "PCA9685.h"


#define SENSOR1 16
#define SENSOR1 2
#define SENSOR2 12 #define SENSOR2 12
#define OE 14 #define OE 14


private: 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 active_brightness = 3000;
uint16_t idle_brightness = 100;
uint16_t active_brightness = 2048;


uint8_t direction = 0; uint8_t direction = 0;
uint8_t switch_direction = 0; uint8_t switch_direction = 0;

Loading…
Cancel
Save