What happens when you give a Raspberry Pi a voice, seven servos, and the personality of a fictional alien engineer?
Leviathan Engineer answered that by building Rocky, the crab-like robot from the 2026 film Project Hail Mary (based on Andy Weir’s novel). In the story an ordinary science teacher has to survive in deep space with help from Rocky. This home-built version recreates Rocky’s rocking, scuttling movement and lets you hold a real conversation with it, which makes it a fun capstone or robotics-club project for anyone who wants to pair mechatronics with speech AI.
What’s inside the build?
The brains are a 4GB Raspberry Pi 5. Movement comes from seven hobby servos wired through a PCA9685 driver HAT, a 16-channel, 12-bit PWM board that talks to the Pi over I2C on just the SDA and SCL pins. Seven servos pull far more current than the Pi’s 5V rail can safely deliver, so the build adds a separate power supply for the motors and keeps logic and servo power sharing a common ground. An internal microphone and a small speaker handle the back-and-forth voice. On the software side, the maker installed Claude Code directly on the Pi to glue it all together: it captures speech, generates a reply in Rocky’s clipped speaking style, then runs text-to-speech so the robot answers out loud. Because a language model is doing the reasoning, Rocky can respond to things that were never hard-coded, like returning a fist bump on request.
Try it yourself
Start small before committing to seven servos. Wire one servo to a PCA9685 breakout, set the I2C address (default 0x40), and sweep it with the Adafruit ServoKit library to confirm your wiring and power are solid. Once a single channel behaves, scale up one channel at a time and only then bolt everything into the body. If a servo jitters, check that your external supply shares a ground with the Pi; that is the usual gotcha. The full write-up is in issue 167 of the Raspberry Pi Official Magazine, and a Raspberry Pi 5 plus a PCA9685 HAT is all the hardware you need to start experimenting.
Frequently Asked Questions
What controls Rocky’s leg movements?
Seven hobby servos drive the legs through a PCA9685 16-channel PWM driver HAT connected to the Raspberry Pi 5 over I2C. A separate power supply feeds the servos so the Pi’s 5V rail is not overloaded, with both grounds tied together.
Do I need to be an AI programmer to build this?
No. The maker installed Claude Code on the Pi to handle the speech recognition, reply generation, and text-to-speech. You can focus on the wiring and servo control and let the language model handle the conversational logic.
What will I learn if I build this?
You will practice I2C communication, PWM servo control, and power management for multiple motors, plus how to wire a language model into real hardware for speech in and speech out. It is a solid mechatronics-plus-AI capstone.
