One-shot bootstrap script for Raspberry Pi Zero 2 W (64-bit Raspberry Pi OS) + SunFounder PiCrawler.
curl -fsSL https://raw.githubusercontent.com/halr9000/picrawler-bootstrap/main/picrawler-setup.sh | bash -s -- --headlessInteractive (prompts before each step):
curl -fsSL https://raw.githubusercontent.com/halr9000/picrawler-bootstrap/main/picrawler-setup.sh | bash| Module | Description |
|---|---|
syspkgs |
apt system packages (build-essential, python3, i2c-tools, ffmpeg, …) |
hwgroups |
Adds user to gpio, i2c, spi groups + udev rule for /dev/gpiomem |
nvm |
Node Version Manager v0.40.1 |
node |
Node.js LTS via nvm |
pnpm |
pnpm package manager |
uv |
uv + uvx Python toolchain |
robot-hat |
SunFounder robot-hat Python library |
vilib |
SunFounder vilib vision library (picamera2 branch) |
picrawler |
SunFounder picrawler library |
demos |
claw9000-demos cloned to ~/claw9000-demos |
i2samp |
i2s amplifier / speaker support |
interfaces |
Enables I2C + camera via raspi-config |
profile |
Adds NVM/pnpm PATH entries to ~/.bashrc |
--headless Non-interactive; auto-answer yes to all prompts
--skip <modules> Comma-separated modules to skip
--only <modules> Run only these modules (skips all others)
--list Print all module names and exit
--help Show usage
Examples:
# Skip two packages
./picrawler-setup.sh --skip vilib,uv
# Only re-run hardware group setup
./picrawler-setup.sh --only hwgroups
# Fully automated first-boot (stock Pi OS has passwordless sudo by default)
curl -fsSL https://raw.githubusercontent.com/halr9000/picrawler-bootstrap/main/picrawler-setup.sh | bash -s -- --headlessWhen all modules complete without errors the script automatically:
- Smoke test — runs
~/claw9000-demos/demos/stand_bob_sit.pyviasudoso GPIO works before re-login (robot sits → stands → bobs × 3 → sits, ~15 sec). - Generates
/opt/picrawler/tada.wav— a short C→E→G chime using ffmpeg. - Installs
picrawler-tada.service— a systemd oneshot that plays the chime 5 seconds after every boot (afteraplay.service). - Reboots in 5 seconds — press Ctrl-C to cancel.
- Raspberry Pi Zero 2 W — quad-core Cortex-A53 @ 1 GHz, 512 MB RAM
- SunFounder PiCrawler — 12-servo quadruped with Robot HAT, ultrasonic sensor, camera, speaker
# Verify I2C (should show Robot HAT address, typically 0x14 or 0x17)
i2cdetect -y 1
# Run a demo (no sudo needed after group membership takes effect post-reboot)
cd ~/claw9000-demos
python3 demos/stand_bob_sit.py- claw9000-demos — demo programs for the PiCrawler
- SunFounder PiCrawler docs
- robot-hat
- vilib