autorope / donkeycar

Open source hardware and software platform to build a small scale self driving car.
http://www.donkeycar.com
MIT License
3.05k stars 1.28k forks source link

Update PCA9685 driver to latest Adafruit CircuitPython driver #1178

Open Ezward opened 1 month ago

Ezward commented 1 month ago

Fixes https://github.com/autorope/donkeycar/issues/1177

Ezward commented 1 month ago

I tested this with a RaspberryPi 5 and PCA9685 and a servo using the calibrate command. It worked as expected. I think we still want to test on an actual car before we release it.

Ezward commented 1 month ago

The code as-is (commmit bca136abf130601088f89760bf635c9841084c80) has a bug in the throttle somewhere. Steering works correctly, but throttle does not. This is likely in the PwmThrottle part and how it interacts with the pin, possibly how the pin is started. However, I have also found that we don't really need this update; the current code works perfectly fine on a RaspberrPi 5 using the latest RaspberryPi OS (bookworm), so I'm pausing work on this branch.