SG90 servo control with PCA9685 and Raspberry Pi Pico board

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Tannar
 
Posts: 23
Joined: Sat Nov 26, 2022 7:44 pm

SG90 servo control with PCA9685 and Raspberry Pi Pico board

Post by Tannar »

I am trying to control servos with a PCA9685 and Raspberry pi Pico board using the editor Mu and Circuit Python. I am new to Circuit python and believe someone with more experience could easily help.

The wiring of the board looks correct. I have downloaded Circuit python and Installed the necessary libraries the tutorial instructs (https://learn.adafruit.com/16-channel-p ... cuitpython) however, when I enter the code that the tutorial uses as a demo to control a standard servo, nothing happens. I don't know if I entered the code incorrectly or if the libraries are imported correctly but some help would be appreciated. I have read as much documentation as I could find but there isn't much and most is outdated

Thanks, Tannar
Attachments
Circuit Library.PNG
Circuit Library.PNG (10.54 KiB) Viewed 69 times
CircuitCode.PNG
CircuitCode.PNG (31.75 KiB) Viewed 69 times

User avatar
Franklin97355
 
Posts: 23903
Joined: Mon Apr 21, 2008 2:33 pm

Re: SG90 servo control with PCA9685 and Raspberry Pi Pico board

Post by Franklin97355 »

By 'nothing happens' do you mean the servo does not twitch when plugged in or just does not move? try moving it to 180, wait a bit, and then move it to 0 and see what happens. Also post a picture of your connections to both the servo and the controller.

User avatar
Tannar
 
Posts: 23
Joined: Sat Nov 26, 2022 7:44 pm

Re: SG90 servo control with PCA9685 and Raspberry Pi Pico board

Post by Tannar »

Thank you for responding. When I said nothing happened, the servo doesn't move or twitch when the code is run. I tried setting it to 180, 90, and 0 and still nothing. Here is the wiring:
Attachments
Pico#1.jpg
Pico#1.jpg (114.11 KiB) Viewed 48 times
Pico#2.jpg
Pico#2.jpg (1021.63 KiB) Viewed 48 times
Pico#3.jpg
Pico#3.jpg (992.3 KiB) Viewed 48 times

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”