You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Flash Raspberry Pi OS (64-bit, Bookworm) to NVMe/SD# Use Raspberry Pi Imager with these settings:# - Enable SSH# - Set hostname: robot# - Set username/password# - Configure WiFi# After boot, update everything
sudo apt update && sudo apt upgrade -y
# Install build essentials
sudo apt install -y \
build-essential \
git \
curl \
cmake \
pkg-config \
libssl-dev \
libasound2-dev \
libclang-dev
2. Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source~/.cargo/env
3. Install Ollama (Local LLM)
curl -fsSL https://ollama.ai/install.sh | sh
# Pull models (choose based on RAM)# 8GB Pi: Use smaller models
ollama pull llama3.2:3b # 3B params, fast
ollama pull moondream # Vision model, small# 4GB Pi: Use tiny models
ollama pull phi3:mini # 3.8B, very fast
ollama pull moondream # Vision# Start Ollama service
sudo systemctl enable ollama
sudo systemctl start ollama
# Test
curl http://localhost:11434/api/tags
4. Install Whisper.cpp (Speech-to-Text)
git clone https://github.com/ggerganov/whisper.cpp
cd whisper.cpp
# Build with ARM optimizations
make -j4
# Download model (base is good balance)
bash ./models/download-ggml-model.sh base
# Install
sudo cp main /usr/local/bin/whisper-cpp
mkdir -p ~/.gloamy/models
cp models/ggml-base.bin ~/.gloamy/models/
5. Install Piper TTS (Text-to-Speech)
# Download Piper binary
wget https://github.com/rhasspy/piper/releases/download/v1.2.0/piper_arm64.tar.gz
tar -xzf piper_arm64.tar.gz
sudo cp piper/piper /usr/local/bin/
# Download voice model
mkdir -p ~/.gloamy/models/piper
cd~/.gloamy/models/piper
wget https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/lessac/medium/en_US-lessac-medium.onnx
wget https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/lessac/medium/en_US-lessac-medium.onnx.json
# Testecho"Hello, I am your robot!"| piper --model ~/.gloamy/models/piper/en_US-lessac-medium.onnx --output_file test.wav
aplay test.wav
6. Install RPLidar SDK
# Install rplidar_ros or standalone SDK
sudo apt install -y ros-humble-rplidar-ros # If using ROS2# Or use standalone Python/Rust driver
pip3 install rplidar-roboticia
# Add user to dialout group for serial access
sudo usermod -aG dialout $USER# Logout and login for group change to take effect
7. Build Gloamy Robot
# Clone repo (or copy from USB)
git clone https://github.com/iBz-04/gloamy
cd gloamy
# Build the standalone robot crate
cargo build --release -p gloamy-robot
# Build the main gloamy binary too if you want to experiment with the root runtime
cargo build --release
ls -la /dev/ttyUSB*# If missing, check USB connection
dmesg | grep -i usb
# Add udev rule if neededecho'SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", MODE="0666", SYMLINK+="rplidar"'| sudo tee /etc/udev/rules.d/99-rplidar.rules
sudo udevadm control --reload-rules
Audio not working
# List devices
arecord -l
aplay -l
# Test with specific device
arecord -D plughw:1,0 -f S16_LE -r 16000 -c 1 -d 3 /tmp/test.wav
aplay -D plughw:0,0 /tmp/test.wav
Ollama slow or OOM
# Check memory
free -h
# Use smaller model
ollama rm llama3.2:3b
ollama pull phi3:mini
# Set memory limitexport OLLAMA_MAX_LOADED_MODELS=1
Motors not responding
# Check serial connection
ls -la /dev/ttyACM*# Test serial communication
screen /dev/ttyACM0 115200
# Type commands to motor controller# Check permissions
sudo usermod -aG dialout $USER
Performance Tips
Use NVMe - SD cards are slow for model loading
Active cooling - Pi 5 throttles without it
Smaller models - llama3.2:3b or phi3:mini
Disable GPU - Pi doesn't have one, saves confusion
Preload models - ollama run llama3.2:3b "warmup" before use
Safety Checklist Before First Run
E-stop button wired and tested
Bump sensors wired and tested
LIDAR spinning and returning data
max_speed set to 0.3 or lower
Robot on blocks/stand (wheels not touching ground)