Prep Servo Shield
Assemble the 16-channel PWM/Servo Shield per the instructions in this Learn Guide.
Use two short lengths of wire to connect the DC barrel jack breakout to the power screw terminal on the shield as shown here. You'll use an external 5V power supply to power the servos separately from the Metro's power.
Then, connect the shield to the Metro (shown here fastened to a Swirly Grid with nylon M2.5 standoffs).
Install Bottango
First, download and install Bottango on your computer. You can find instructions here.
Bottango Arduino Driver
Bottango controls your servo motors via serial commands sent to an Arduino-compatible microcontroller -- in our case, the Metro ESP32-S2.
Next, copy the BottangoArduioDriver
folder from the downloaded directory you uncompressed during installation to your Arduino library
folder.
Launch Arduino IDE and then install the Arduino PWM Servo library with all dependencies when asked.
Arduino Sketch
Open the included BottangoArduinoDriver.ino sketch in the Arduino IDE.
When the sketch opens it will also open the associated config files in the Arduino IDE tabs. Click on the BottangoArduinoConfig.h tab and then uncomment the line #define USE_ADAFRUIT_PWM_LIBRARY
then save the file.
Switch back to the BottangoArduinoDriver.ino tab. Set the following setting:
- Tools > Board > "Adafruit Metro ESP32-S2"
- Tools > Port select the port you've plugged the board into
Then, click Sketch > Upload to flash the board.
Servo Setup
Next we'll look at how to configure a servo part in Bottango to control a real-world servo via the Servo Shield over I2C.
In Bottango, create a servo motor part. With it selected click Part Setup > Connection > Pin and then select i2c and Pin. Set the i2c Address to 0x40 and Pin to 0 (or 1, 2, 3, etc. as you plug in more servos to the shield.
Hardware Port
In Bottango you need to establish the Serial connection to the Metro ESP32-S2's hardware port. Click the Hardware button at the top of the UI.
in section 2 click on the Search or select port? dropdown and choose Select port from list.
Click the Select Port button. Then, pick the USB port you used earlier for Arduino sketch upload from the list on the right, in my case it was /dev/tty.usbmodem4101. On a PC it'll be something like COM3:
PWM Settings
You can select a servo and adjust PWM ranges on a per-motor basis. With the driver running you'll see the real-world servo motor move as you adjust these settings.
The high torque Tower Pro servos seem to work well with the 500-2500 PWM range shown here, but you can adjust as needed.
Now that you're set up, follow the basic tutorial here to familiarize yourself with the basics of setting up your rig and setting keyframes.
Page last edited January 20, 2025
Text editor powered by tinymce.