Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PCA9685 driver to latest Adafruit CircuitPython driver #1178

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Ezward
Copy link
Contributor

@Ezward Ezward commented May 13, 2024

Fixes #1177

  • change pi and nano install to install the new driver.

  • update pins.py to use new driver to provide output and pwm pins on a PCA9685 board.

  • Change the PCA9685 actuator to be a subclass of PulseController, so it inherits the underlying pin provider and pulse controller api. This elimnates the duplicate code in pins.py and actuator.py.

  • Test PCA9685 drivetrains on RaspberryPi 4

  • Test PCA9685 drivetrains on RaspberryPi 5

  • Test PCA9685 drivetrains on Jetson Nano

  • Test I2c OLED

- change pi and nano install to install the new driver.
- update pins.py to use new driver to provide output and pwm
  pins on a PCA9685 board.
- Change the PCA9685 actuator to be a subclass of PulseController,
  so it inherits the underlying pin provider and pulse controller
  api.  This elimnates the duplicate code in pins.py and actuator.py.
@Ezward Ezward force-pushed the 1177-update-i2c-driver-for-bookwork branch from 1bff13f to bca136a Compare May 13, 2024 07:00
@Ezward
Copy link
Contributor Author

Ezward commented May 16, 2024

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 Ezward marked this pull request as ready for review May 18, 2024 04:13
@Ezward
Copy link
Contributor Author

Ezward commented May 20, 2024

The code as-is (commmit bca136a) 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I2c package needs to be update to work on bookworm
1 participant