Adafruit-PWM-Servo-Driver-Library icon indicating copy to clipboard operation
Adafruit-PWM-Servo-Driver-Library copied to clipboard

new function setAllPWM

Open matrix1000 opened this issue 4 years ago • 1 comments

new function setAllPWM for setting the pwm off all ports of the PCA9685 at the same time

Usefull if you want to change the PWM state of all pins at the same.

matrix1000 avatar May 22 '21 12:05 matrix1000

Hey @matrix1000 , sorry this got missed. If you're still interested in submitting this PR, can you please update the I2C code to use BusIO. These lines would need to be changed:

  _i2c->beginTransmission(_i2caddr);
  _i2c->write(PCA9685_ALLLED_ON_L);
  _i2c->write(on);
  _i2c->write(on >> 8);
  _i2c->write(off);
  _i2c->write(off >> 8);
  _i2c->endTransmission();

Can use the code in setPWM() as an example for how to do the I2C with BusIO.

caternuson avatar Aug 10 '23 16:08 caternuson