Raspberry Pi Setup
Raspberry Pi boards can run ZeroClaw natively with direct GPIO access—no firmware flashing required. This makes them ideal for edge-native AI agents and autonomous robots.Supported Models
| Model | RAM | Architecture | Status | Use Case |
|---|---|---|---|---|
| Raspberry Pi 5 | 4GB / 8GB | ARM Cortex-A76 | ✅ Recommended | Production robots, Ollama |
| Raspberry Pi 4 | 4GB / 8GB | ARM Cortex-A72 | ✅ Stable | General use |
| Raspberry Pi 3 B+ | 1GB | ARM Cortex-A53 | ✅ Stable | Light workloads |
| Raspberry Pi Zero 2 W | 512MB | ARM Cortex-A53 | ✅ Stable | Constrained devices |
| Raspberry Pi Zero W | 512MB | ARMv6 | ✅ Special build | Ultra-minimal |
Quick Start
1. Build with GPIO Support
2. Configure GPIO Peripheral
3. Set Up Permissions
4. Test GPIO
GPIO Pin Reference
40-Pin Header (BCM Numbering)
ZeroClaw uses BCM pin numbering, not physical pin numbers.Common Pins
| Function | BCM Pins | Notes |
|---|---|---|
| General GPIO | 2-27 (except special) | Any digital I/O |
| I2C | GPIO 2 (SDA), GPIO 3 (SCL) | Default I2C bus |
| SPI | GPIO 9 (MISO), GPIO 10 (MOSI), GPIO 11 (SCLK) | Hardware SPI0 |
| PWM | GPIO 12, 13, 18, 19 | Hardware PWM |
| UART | GPIO 14 (TX), GPIO 15 (RX) | Serial console |
Wiring Examples
LED Blink
Button Input
Motor Controller (L298N)
Building on Raspberry Pi Zero W
The Pi Zero W (512MB RAM, ARMv6) requires special consideration:Add Swap Space
Install Dependencies
Install Rust
Build for musleabihf (Recommended)
Cross-compilation from a faster machine is highly recommended. See the Raspberry Pi Zero W Build Guide for details.
GPIO Tools
ZeroClaw exposes these GPIO tools to agents:gpio_read
Read the value (0 or 1) of a GPIO pin.
Parameters:
pin(integer): BCM GPIO pin number (2-27)
gpio_write
Set a GPIO pin high (1) or low (0).
Parameters:
pin(integer): BCM GPIO pin numbervalue(integer): 0 for LOW, 1 for HIGH
Robot Kit Integration
For building autonomous robots on Raspberry Pi, see the Robot Kit documentation. Key features:- Local Ollama for offline AI
- Camera vision (moondream)
- Speech (Whisper + Piper)
- Motor control via GPIO
- LIDAR obstacle avoidance
Troubleshooting
”Permission denied” when accessing GPIO
”Failed to connect RPi GPIO”
Pin already in use
Build fails on Pi Zero W
Performance Tips
- Use NVMe on Pi 5: Much faster than SD cards
- Active cooling: Prevents thermal throttling
- Overclock (optional): Add to
/boot/config.txt: - Disable desktop: Use Raspberry Pi OS Lite
- Static build: Use musleabihf target for smaller binaries
Next Steps
Robot Kit Setup
Build an autonomous robot on Pi
Supported Boards
Compare all hardware platforms
Hardware Architecture
Understand the peripheral system
Robot Kit API
API reference for robot tools