Skip to main content

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

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

Do not use:
  • GPIO 0, 1: Reserved for HAT EEPROM
  • GPIO 14, 15: Serial console (unless disabled)
  • 5V or 3.3V pins: Power only, not GPIO

Wiring Examples

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

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)
Example:

gpio_write

Set a GPIO pin high (1) or low (0). Parameters:
  • pin (integer): BCM GPIO pin number
  • value (integer): 0 for LOW, 1 for HIGH
Example:

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

  1. Use NVMe on Pi 5: Much faster than SD cards
  2. Active cooling: Prevents thermal throttling
  3. Overclock (optional): Add to /boot/config.txt:
  4. Disable desktop: Use Raspberry Pi OS Lite
  5. 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

Reference