[−][src]Function adafruit_motorkit::init_pwm
pub fn init_pwm(i2c: Option<I2cdev>) -> Result<Pca9685<I2cdev>, MotorError>
Initializes the PWM to control the Motor HAT. This makes a few assumptions:
- Assumes only one Motor HAT as 0x96.
- Assumes only a pre-scale of 4 so the HAT is running at ~1600 Hz.
If no I2C bus is provided to the function, it will attempt to connect to /dev/i2c-1 which will work in most cases.