Jetbot with PWM/Servo

Hello,

Can anyone give me some tips on how to get the “Adafruit 16-Channel 12-bit PWM/Servo Driver - I2C interface - PCA9685” working on a Jetbot (nvidia nano project)? We are doing a project, and have the Adafruit “Stepper Featherwing” working to control 4 motors. We added a PWM/Servo Driver to control some servos for the camera mount, but cannot get it to work. We are using Jupiter Notebooks, and cannot figure out the code needed to interface with the PWM/Server.

Any help would be much appreciated

Do you have the driver hooked up to it’s own 5V power supply? The nano doesn’t push a lot of current through the GPIO. so you may have hit the threshold of your available power from the board.
If you do have power running to the driver, could you take a picture of your pin connections and the script you are using? I’ll take a look.
Also take a look here https://github.com/JetsonHacksNano/ServoKit.git
He does really great walkthroughs and the shell files make it all easy.

Hello,

We have a separate power supply. I think we have the connections worked out, it is mainly the code that we don’t understand how to implement. We are using a motor controller as well, and the code was provided as part of the Jetbot image to control it. The default python modules were configured to use 2 motors, and we were able to figure out how to make it control 4 motors. In looking at the modules, they are calling the AdaFruit_MotorHAT file/library (not sure what it is called), “from Adafruit_MotorHAT import Adafruit_MotorHAT”. There is another file/library on the system called “Adafruit_PWM_Sevo_Driver”, and in looking at it, it appears to have the code to control the server board… but we can’t figure out how to interface with it via python, and jupyter notebooks.

Thanks for the link, I will check it out.

Okay so adafruit made this all really simple. They have ported over the circuitpython blinka library to work with the nano. It is what I’m using and I love it. Full python control over the gpio and sensors. If you are trying to use the standard adafruit libraries. Those are coded in arduino. Which is a mix of java and c+.
https://learn.adafruit.com/circuitpython-libraries-on-linux-and-the-nvidia-jetson-nano/circuitpython-dragonboard