Datasheet

and when it will turn of. Channel indicates which of the 16 PWM outputs should be updated
with the new values.
Arguments
channel: The channel that should be updated with the new values (0..15)
on: The tick (between 0..4095) when the signal should transition from low to high
off:the tick (between 0..4095) when the signal should transition from high to low
Example
The following example will cause channel 15 to start low, go high around 25% into the pulse
(tick 1024 out of 4096), transition back to low 75% into the pulse (tick 3072), and remain low
for the last 25% of the pulse:
If you need to calculate pulse-width in microseconds, you can do that by first figuring out
how long each cycle is. That would be 1/freq where freq is the PWM frequency you set
above. For 1000 Hz, that would be 1 millisecond. Then divide by 4096 to get the time per
tick, eg 1 millisecond / 4096 = ~0.25 microseconds. If you want a pulse that is 10
microseconds long, divide the time by time-per-tick (10us / 0.25 us = 40) then turn on at tick
0 and turn off at tick 40.
© Adafruit Industries
https://learn.adafruit.com/adafruit-16-channel-pwm-servo-hat-for-
raspberry-pi
Page 19 of 25