kidoman / embd

Embedded Programming Framework in Go
http://embd.kidoman.io
MIT License
1.28k stars 156 forks source link

pca9685 PWM Controller - initialize Mode2 register with OUTDRV=1 #94

Open RyAndrew opened 6 years ago

RyAndrew commented 6 years ago

I was trying to figure out why the adafruit driver works and this one does not. https://github.com/adafruit/Adafruit-Motor-HAT-Python-Library/blob/master/Adafruit_MotorHAT/Adafruit_PWM_Servo_Driver.py

Mode register 2 was never configured. Also I believe sleep here is unnecessary. Was this confused with a sleep for golang?? "It takes 500 us max. for the oscillator to be up and running once SLEEP bit has been set to logic 0." page 14 of the datasheet