Raspberry Pi Setup and Configuration
🔧 Required tools: Computer, USB cable, SD Card Reader
📦 Required components: Raspberry Pi, SD Card, assembled LeLamp hardware
Overview
The Raspberry Pi serves as the central control unit for LeLamp, managing:- Servo motor control and coordination
- Audio input/output processing
- LED matrix control and effects
- Camera input and computer vision
- Network communication and remote control
Step 1: Operating System Installation
Download Raspberry Pi Imager
- Windows
- macOS
- Linux
Select Operating System
- Click “Choose OS”
- Select “Raspberry Pi OS (other)”
- Choose “Raspberry Pi OS Lite (64-bit)”
Configure Advanced Settings
Network Configuration
Network Configuration
- SSID: Your WiFi network name
- Password: Your WiFi password
- Country: Select your country for proper WiFi regulations
User Account
User Account
- Username: Create a memorable username (e.g., “pi”, “lelamp”)
- Password: Use a strong password for security
- Remember these credentials - you’ll need them for SSH access
System Settings
System Settings
- ✅ Enable SSH (required for remote access)
- Choose password authentication or SSH keys
- Set timezone for your location
- Configure keyboard layout if needed
Flash the SD Card
- Insert SD card into your computer
- Select storage device in Pi Imager
- Click “Write” to begin flashing process
- Wait for completion (typically 5-10 minutes)
- Safely eject SD card when finished
Step 2: Initial Pi Boot and Connection
First Boot
- Insert SD card into Raspberry Pi
- Connect power supply (5V 2A USB-C)
- Wait for boot process (2-3 minutes for first boot)
- Observe LED indicators - steady red power, blinking green activity
Establish SSH Connection
- Using Hostname
- Using IP Address
- Troubleshooting Connection
Step 3: LeLamp Runtime Installation
Update System Packages
Install System Dependencies
- portaudio19-dev: Audio input/output support
- git: Version control for downloading LeLamp runtime
- curl: Network tools for downloading additional software
Clone LeLamp Runtime Repository
ls -laInstall UV Package Manager
Install LeLamp Runtime
--extra hardware flag includes additional packages needed for:- GPIO control and hardware interfaces
- Camera and sensor support
- Real-time audio processing
- LED matrix control libraries
Step 4: Audio System Configuration
Configure the ReSpeaker Hat for microphone input and speaker output.Install ReSpeaker Device Tree
Configure Boot Settings
- Enables the ReSpeaker device tree overlay
- Activates I2S memory mapping for better audio performance
Configure Audio System
Reboot and Verify Audio
Configure Audio Levels
- Press F6 to select audio device
- Choose “seeed2micvoicec” from the list
- Navigate to “Line”, “Line DAC”, and “PCM” controls
- Unmute channels by pressing ‘M’ (if showing “MM”)
- Set volume levels to 100% initially
- Press Esc to exit
Step 5: System Component Testing
Test each LeLamp subsystem to verify proper installation and configuration.Test LED Matrix
- LEDs should light up in sequence
- Multiple colors and patterns displayed
- Smooth transitions between effects
If UV command not found as root
If UV command not found as root
Add UV to sudo PATH (optional)
Add UV to sudo PATH (optional)
Test Audio System
- Test tone plays through speaker
- Microphone records and plays back audio
- No distortion or audio artifacts
- Audio Test Success
- Troubleshooting Audio
- Clear audio output from speaker
- Microphone picks up voice/sounds
- Playback matches recorded audio
- No crackling or distortion
Test Servo Communication
- Connect servo driver to Pi via USB
-
Find servo port:
-
Test servo communication:
your_lamp_name with the name you used during servo setup, and /dev/ttyACM0 with the actual port found.- All 5 servos respond to commands
- Smooth movement through range of motion
- No communication errors or timeouts
- Position feedback matches commanded positions
Test Camera (Optional)
- Camera preview displays for 2 seconds
- Test image captured successfully
- Image quality appropriate for intended use
Step 6: Network Configuration Optimization
Configure Static IP (Optional)
Enable SSH Key Authentication (Recommended)
System Performance Optimization
Configure GPU Memory Split
Disable Unnecessary Services
Configure Automatic Startup (Optional)
your_lamp_name with your actual lamp identifier and adjust paths as needed.Final System Verification
Complete System Test
- Servo motor control and coordination
- LED matrix effects and control
- Audio input/output functionality
- System performance and stability
Performance Monitoring
- CPU usage < 50% during normal operation
- Temperature < 70°C under load
- No error messages in system logs
- Stable network connectivity
Setup Completion Checklist
Operating System
Operating System
- Raspberry Pi OS Lite installed and configured
- SSH access working reliably
- Network connectivity stable
- System packages updated to latest versions
- User account properly configured
LeLamp Runtime
LeLamp Runtime
- Runtime repository cloned successfully
- UV package manager installed and working
- All Python dependencies installed
- Hardware support packages configured
- Runtime tests pass without errors
Hardware Integration
Hardware Integration
- ReSpeaker Hat configured and working
- Audio input/output tested successfully
- LED matrix control functional
- Servo communication established
- Camera working (if applicable)
System Optimization
System Optimization
- Performance optimizations applied
- Unnecessary services disabled
- Memory allocation optimized
- Network configuration stable
- System monitoring tools configured
What You Should Have
At this stage, you should have:- Fully configured Raspberry Pi running optimized LeLamp software
- Working audio system with microphone input and speaker output
- Functional LED matrix with programmable effects
- Reliable servo communication for motor control
- Stable network connectivity for remote access and control
- Comprehensive testing confirming all subsystems work correctly
Previous: Assembly Guide | Next: Lamp Control