mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 13:02:59 +00:00
d9a9ca3e17a1b2b760f514e53f4a702fa1664196
LEDSportsMatrix
A modular LED matrix display system for sports information using Raspberry Pi and RGB LED matrices.
Hardware Requirements
- Raspberry Pi 3 or newer
- Adafruit RGB Matrix Bonnet/HAT
- LED Matrix panels (64x32)
Installation
- Clone this repository:
git clone https://github.com/yourusername/LEDSportsMatrix.git
cd LEDSportsMatrix
- Install dependencies:
pip3 install -r requirements.txt
Configuration
- Copy the example configuration:
cp config/config.example.json config/config.json
- Edit
config/config.jsonwith your preferences
Important: Sound Module Configuration
- Remove unnecessary services that might interfere with the LED matrix:
sudo apt-get remove bluez bluez-firmware pi-bluetooth triggerhappy pigpio
- Blacklist the sound module:
cat <<EOF | sudo tee /etc/modprobe.d/blacklist-rgb-matrix.conf
blacklist snd_bcm2835
EOF
sudo update-initramfs -u
- Reboot:
sudo reboot
Running the Display
From the project root directory:
sudo python3 display_controller.py
The display will alternate between showing:
- Current time
- Weather information (requires API key configuration)
Development
The project structure is organized as follows:
LEDSportsMatrix/
├── config/ # Configuration files
│ ├── config.json # Main configuration
│ └── config_secrets.json# API keys and sensitive data
├── src/ # Source code
│ ├── display_manager.py # LED matrix display handling
│ ├── clock.py # Clock display module
│ └── weather.py # Weather display module
└── display_controller.py # Main entry point
Performance Optimization
To reduce flickering and improve display quality:
- Edit
/boot/firmware/cmdline.txt:
sudo nano /boot/firmware/cmdline.txt
-
Add
isolcpus=3at the end of the line -
Save and reboot:
sudo reboot
For sensitive settings like API keys:
- Copy the template:
cp config/config_secrets.template.json config/config_secrets.json - Edit
config/config_secrets.jsonwith your API keys
Note: If you still experience issues, you can additionally disable the audio hardware by editing /boot/firmware/config.txt:
sudo nano /boot/firmware/config.txt
And adding:
dtparam=audio=off
Alternatively, you can:
- Use external USB sound adapters if you need audio
- Run the program with
--led-no-hardware-pulseflag (may cause more flicker)
Project Structure
src/clock.py- Main clock applicationconfig_manager.py- Configuration managementdisplay_manager.py- LED matrix display handling
config/config.json- Configuration settingsconfig_secrets.json- Private settings (not in git)
Languages
Python
58.8%
JavaScript
18.6%
HTML
15.8%
Shell
6.1%
CSS
0.7%