Files
lighting-controller/test/setup_spi.sh
Pi User 5a05ee99a1 Add ESP32-C3 SPI slave with ESP-NOW, Raspberry Pi test tools, and updated project structure
- ESP32-C3 SPI slave project with ESP-NOW broadcast functionality
- Raspberry Pi SPI master test tools and CLI for JSON communication
- Merged src/ directory from full branch with lighting controller code
- Updated Pipfile with system install scripts and ESP32 monitoring
- Added comprehensive test suite for SPI communication
2025-10-01 21:08:28 +13:00

34 lines
825 B
Bash
Executable File

#!/bin/bash
# Setup script for SPI testing on Raspberry Pi
echo "Setting up SPI for testing..."
# Enable SPI interface
echo "Enabling SPI interface..."
sudo raspi-config nonint do_spi 0
# Install required packages
echo "Installing required packages..."
sudo apt update
sudo apt install -y python3-spidev python3-pip
# Install Python dependencies using pipenv
echo "Installing Python dependencies with pipenv..."
cd ..
pipenv install
# Check SPI devices
echo "Checking SPI devices..."
ls -la /dev/spi*
# Show GPIO configuration
echo "GPIO Configuration:"
echo " SCK: GPIO11 (Physical pin 23)"
echo " MISO: GPIO9 (Physical pin 21)"
echo " MOSI: GPIO10 (Physical pin 19)"
echo " CS: GPIO8 (Physical pin 24)"
echo "Setup complete!"
echo "Run send-json with:"
echo " pipenv run send-json --beat --brightness 128"