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
This commit is contained in:
33
test/setup_spi.sh
Executable file
33
test/setup_spi.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/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"
|
Reference in New Issue
Block a user