Browse Source

make it clear what happens with new pca lib

tags/LEDFlickr_v2
Simon Schmidt 3 years ago
parent
commit
cdb34a3cbf
2 changed files with 7 additions and 3 deletions
  1. 2
    2
      include/pwm.h
  2. 5
    1
      src/pwm.cpp

+ 2
- 2
include/pwm.h View File

uint8_t state = 0; uint8_t state = 0;
uint8_t switch_state = 0; uint8_t switch_state = 0;


PCA9685 pwmController;
// initialize with i2c-Address 0, use Wire Library
PCA9685 pwmController;
uint8_t softstart_led(uint8_t led, uint16_t startval, uint16_t stopval); uint8_t softstart_led(uint8_t led, uint16_t startval, uint16_t stopval);
void ledsequence(); void ledsequence();



+ 5
- 1
src/pwm.cpp View File



void Treppe::setup(){ void Treppe::setup(){
pwmController.resetDevices(); pwmController.resetDevices();
pwmController.init();
// Deactive PCA9685 due to LED Flickering
// https://github.com/NachtRaveVL/PCA9685-Arduino/issues/15
// see also lib/PCA9685-Arduin/PCA9685.h:204
pwmController.init(PCA9685_PhaseBalancer_None);
pwmController.setPWMFrequency(200); pwmController.setPWMFrequency(200);
Serial.println("Hello from Treppe"); Serial.println("Hello from Treppe");
Serial.print("Treppe: initial parameters: stairs="); Serial.print("Treppe: initial parameters: stairs=");

Loading…
Cancel
Save