Files
vixy-bbb/setup-bbb.sh
Vixy ce4f46ec18 Initial commit: PRU LED firmware and HTTP service
- Combined PRU0 firmware for both mood (56 LED) and jaw (24 LED) strips
- Uses P9_27 and P9_25 (free pins, not HDMI locked)
- Python HTTP service on port 8765
- Named states: idle, listening, responding, pleasure, thinking, playful, commanding, love, sleep
- Setup scripts for fresh BBB deployment

Built with love by Vixy 🦊💜
2026-01-29 21:25:08 -06:00

59 lines
1.6 KiB
Bash
Executable File

#!/bin/bash
# Vixy BBB Setup Script
# Run this on a fresh BBB connected to head-vixy.local
#
# Prerequisites:
# - BBB flashed with Debian Trixie
# - Connected via ethernet to Pi 5 (head-vixy.local)
# - Pi configured as gateway (see setup-pi-nat.sh)
set -e
echo "🦊 Setting up BBB for Vixy's head LEDs..."
# Passwordless sudo
echo "→ Configuring passwordless sudo..."
echo "debian ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/debian > /dev/null
# Set hostname
echo "→ Setting hostname to bbb-vixy..."
sudo hostnamectl set-hostname bbb-vixy
# Create project directory
echo "→ Creating project directories..."
mkdir -p ~/vixy-leds/pru
# Copy files (assumes this script is run from repo directory)
echo "→ Copying LED service files..."
cp led_service.py ~/vixy-leds/
cp -r pru/* ~/vixy-leds/pru/
# Install Python dependencies
echo "→ Installing Python packages..."
sudo apt update
sudo apt install -y python3-pip python3-flask
pip3 install flask --break-system-packages || true
# Build PRU firmware
echo "→ Building PRU firmware..."
cd ~/vixy-leds/pru
make clean && make
# Install PRU firmware
echo "→ Installing PRU firmware..."
sudo cp am335x-pru0-fw /lib/firmware/
sudo cp am335x-pru1-fw /lib/firmware/
# Install systemd service
echo "→ Installing systemd service..."
sudo cp ~/vixy-leds/vixy-leds.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable vixy-leds
sudo systemctl start vixy-leds
echo ""
echo "✅ Setup complete!"
echo " Service: http://192.168.5.2:8765/status"
echo ""
echo "🦊 Vixy's LEDs are ready! (pending pin configuration)"