Raspberry Pi Setup and Configuration
⏱️ Estimated time: 1–2 hours
🔧 Required tools: Computer, USB cable, SD Card Reader
📦 Required components: Raspberry Pi, SD Card, assembled LeLamp hardware
🔧 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
Install the official Raspberry Pi Imager on your computer.
- Windows
- macOS
- Linux
Download and run the Windows installer from the official website.
Select Operating System
Recommended OS: Raspberry Pi OS Lite (64-bit) - Debian Bookworm versionIn Raspberry Pi Imager:
We use the Lite version (no desktop environment) to maximize system resources for LeLamp operations and reduce boot time.
- Click “Choose OS”
- Select “Raspberry Pi OS (other)”
- Choose “Raspberry Pi OS Lite (64-bit)”
Verify you’ve selected the 64-bit Lite version for optimal performance.
Configure Advanced Settings
Click the gear icon (⚙️) to configure essential settings:
Network Configuration
Network Configuration
WiFi Settings:
- SSID: Your WiFi network name
- Password: Your WiFi password
- Country: Select your country for proper WiFi regulations
User Account
User Account
User Configuration:
- 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
Hostname: Set a unique name (e.g., “lelamp-pi”, “my-lelamp”)SSH Configuration:
- ✅ 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
The flashing process will erase all data on the SD card. Ensure you’ve backed up any important files.
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
The first boot takes longer as the Pi expands the filesystem and completes initial setup.
Step 3: LeLamp Runtime Installation
Update System Packages
Update the Pi’s software packages to the latest versions:
This process may take 10-15 minutes depending on the number of updates available.
Install System Dependencies
Install required system packages for audio processing:These packages provide:
- portaudio19-dev: Audio input/output support
- git: Version control for downloading LeLamp runtime
- curl: Network tools for downloading additional software
Clone LeLamp Runtime Repository
Download the LeLamp runtime software:
Verify the download by listing directory contents:
ls -laStep 4: Audio System Configuration
Configure the ReSpeaker Hat for microphone input and speaker output.Install ReSpeaker Device Tree
Download and install the device tree overlay for ReSpeaker 2-Mics Pi HAT:
Configure Boot Settings
Add ReSpeaker support to boot configuration:This configuration:
- Enables the ReSpeaker device tree overlay
- Activates I2S memory mapping for better audio performance
Configure Audio System
Set up ALSA (Advanced Linux Sound Architecture) for the ReSpeaker:
The card number (3) may vary depending on your Pi model and other connected devices. We’ll verify this in the testing step.
Reboot and Verify Audio
Restart the Pi to apply audio configuration:After reboot, reconnect via SSH and verify audio devices:Expected output should include:
ReSpeaker device appears in audio device list with correct driver.
Configure Audio Levels
Set appropriate audio levels using ALSA mixer:In alsamixer:
- 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
Verify LED matrix control and effects:Expected behavior:
- 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
Find UV path and use full path:
Add UV to sudo PATH (optional)
Add UV to sudo PATH (optional)
For convenience, add UV to sudo’s secure path:Add your user’s .local/bin to the secure_path line:
Test Audio System
Verify microphone input and speaker output:Expected behavior:
- 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
Verify servo driver connection and motor control:Expected behavior:
- Connect servo driver to Pi via USB
-
Find servo port:
-
Test servo communication:
Replace
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
Step 6: Network Configuration Optimization
Configure Static IP (Optional)
For consistent network access, configure a static IP address:Add configuration for your network:
Adjust IP addresses to match your network configuration. Ensure the chosen IP doesn’t conflict with other devices.
System Performance Optimization
Configure GPU Memory Split
Optimize memory allocation for headless operation:Navigate to: Advanced Options → Memory Split
Set GPU memory to 16MB (minimum for headless operation)
Final System Verification
Complete System Test
Run comprehensive system test to verify all components:This test verifies:
- Servo motor control and coordination
- LED matrix effects and control
- Audio input/output functionality
- System performance and stability
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
Raspberry Pi Setup Complete! Your LeLamp is now ready for calibration and operation.
Previous: Assembly Guide | Next: Lamp Control