You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears on motor is controlled via the PCA9685 and one via GPIO. Given that DB21M has 5 RGB LEDs driven by PCA9685, it seem there would be conflicts in addressing the motor and LEDs. So that motor configuration seems wrong.
The text was updated successfully, but these errors were encountered:
This is what I figured out from the code; the pwm value (the third value in the triplet), is always used as the channel on the PCA9685, so in the HATv3 code, motor 1 uses channel 8 on the PCA9685 and motor 2 used channel 13. The difference between the motors is how the two motor direction signals are sent to the motor controller; either via the PCA9685 for MotorDirectionControl.PWM or via a GPIO pin for MotorControlDirection.GPIO. I'm not sure why it was chosen to use GPIO for motor 2 but not motor 1, but I can see now how it works.
So here for motor 1 the first two values of the triplet, 10 and 9 refer to channels/pins on the PCA9685. For motor 2 they represent pin number of the Jetson Nano header.
It's not technically a bug, but it certainly is a little strange and confusing to someone (at least to me) unless they really dig into the code.
dt-duckiebot-interface/packages/hat_driver/include/hat_driver/hat.py
Line 45 in 97373d8
It appears on motor is controlled via the PCA9685 and one via GPIO. Given that DB21M has 5 RGB LEDs driven by PCA9685, it seem there would be conflicts in addressing the motor and LEDs. So that motor configuration seems wrong.
The text was updated successfully, but these errors were encountered: