Hexapod
The first article in a series on hexapod design and implementation
ESP32-S3R8
About two years ago, I got my hands on an ESP32-S3R8 microcontroller, also known as the Lilygo T-Display-S3. I wrote a clock application in TinyGo and… abandoned the project.
Now it’s 2026, and I’m itching to get my hands dirty again. I want to build something more interesting than yet another API/gRPC service—and definitely not another Telegram bot.
If you research ESP32 projects, one of the first things you’ll come across is a Wi-Fi scanner:
package main
import (
"time"
"tinygo.org/x/espradio"
)
func main() {
time.Sleep(2 * time.Second)
println("Initializing Wi-Fi...")
if err := espradio.Enable(espradio.Config{}); err != nil {
println("Enable error:", err.Error())
return
}
if err := espradio.Start(); err != nil {
println("Start error:", err.Error())
return
}
for range time.NewTicker(5 * time.Second).C {
println()
println("Scanning Wi-Fi...")
aps, err := espradio.Scan()
if err != nil {
println("Scan error:", err.Error())
} else {
println("Found:", len(aps))
for _, ap := range aps {
println("SSID:", ap.SSID, "| RSSI:", ap.RSSI, "dBm")
}
}
}
}
Let’s flash the firmware…
> tinygo flash -monitor -target=esp32s3-generic -serial=usb -port=COM6 .
But there’s also BLE/Bluetooth. I played around with connecting the ESP32 to a bike computer (BC), but that hit a dead end because of its proprietary nature and the lack of API documentation for the bike computer itself. I’m not quite ready to dive into reverse engineering just yet.
I Want a Spider
While browsing the internet, I came across this article about a Six-Legged Spider Robot with Servos and Arduino—special thanks to the author for all the work they put into it.
Here’s what I want to build:
- Three servos per leg, for a total of 18 servos.
- The three legs on the right connect to the right-hand
PCA9685, and the three legs on the left connect to the left-hand one. That gives us twoPCA9685boards. I’ll need to do some soldering to change the PWM address-selection jumper. - The two
PCA9685boards are connected in series:PCA9685→PCA9685→ESP32-S3. - The
ESP32-S3will serve as the motion controller. - Separate power lines for the logic and power stages.
- An Orange Pi 4 LTS connects to the ESP32 via
UART_RXandUART_TX.