I got this board to make a Hexapod robot with 18 servos. I connected 18 servos (Tower Pro MG90S) to the board. I took the multiple_servos.py example file and modified it to create 18 servos. I know the comment mentioned that only 16 servos can be created, but I tried any way.
import time import math from servo import Servo, servo2040
# Create a list of servos for pins 0 to 3. Up to 16 servos can be created START_PIN = servo2040.SERVO_1 END_PIN = servo2040.SERVO_18 servos = [Servo(i) for i in range(START_PIN, END_PIN + 1)]
the servo on the 2nd pin and the 18th pin moves in unison. [2] to [16] pins work as expected.
Is there something I need to do to get 18 servos working independently? This board was marketed as an 18 servo board, so I would assume that it can control 18 servos independently.
Thanks alphanumeric for that link, but I tried that code and it did nothing. So, I loaded the servo_cluster.py example and ran it with 18 servos created. It also did nothing. So, I added a print statement after the ServoCluster statement, and it never gets to the print statement. I have the latest firmware installed.
import gc
import time
import math
from servo import ServoCluster, servo2040
Thanks again alphanumeric, but I think I will switch to an arduino mega with the servo shield for my project. I think the Servo2040 is a decent controller for 16 servos, it doesn’t seem to be an 18 servo controller. Also, it lacks a pinout diagram. Other pimoroni board do have a pinout diagram.
I reached out to technical support via email twice but did not get much help.
I’m thinking there is no pinout because it has an RP2040 onboard, not a full Pico or Pico W?
The schematic will tell you what pins do what, with some sleuthing. servo2040.sch (shopify.com)