diff --git a/README.md b/README.md index e6f015f5..c9d0bec3 100644 --- a/README.md +++ b/README.md @@ -16,24 +16,19 @@ Modular, rotating Displays that can be individually enabled or disabled per the ### Time and Weather - Real-time clock display -- ![DSC01342](https://github.com/user-attachments/assets/a3c9d678-b812-4977-8aa8-f0c3d1663f05) + - Current Weather, Daily Weather, and Hourly Weather Forecasts -- ![DSC01332](https://github.com/user-attachments/assets/19b2182c-463c-458a-bf4e-5d04acd8d120) -- ![DSC01335](https://github.com/user-attachments/assets/4bcae193-cbea-49da-aac4-72d6fc9a7acd) -- ![DSC01333](https://github.com/user-attachments/assets/f0be5cf2-600e-4fae-a956-97327ef11d70) + - Google Calendar event display ### Sports Information The system supports live, recent, and upcoming game information for multiple sports leagues: - NHL (Hockey) -- ![DSC01347](https://github.com/user-attachments/assets/854b3e63-43f5-4bf9-8fed-14a96cf3e7dd) -- ![DSC01339](https://github.com/user-attachments/assets/13aacd18-c912-439b-a2f4-82a7ec7a2831) -- ![DSC01338](https://github.com/user-attachments/assets/8fbc8251-f573-4e2b-b981-428d6ff3ac61) + - NBA (Basketball) - MLB (Baseball) -- ![DSC01346](https://github.com/user-attachments/assets/fb82b662-98f8-499c-aaf8-f9241dc3d634) -- ![DSC01341](https://github.com/user-attachments/assets/f79cbf2e-f3b4-4a14-8482-01f2a3d53963) + - NFL (Football) - NCAA Football - NCAA Men's Basketball @@ -45,7 +40,7 @@ The system supports live, recent, and upcoming game information for multiple spo - Near real-time stock & crypto price updates - Stock news headlines - Customizable stock & crypto watchlists -- ![DSC01317](https://github.com/user-attachments/assets/01a01ecf-bef1-4f61-a7b2-d6658622f73d) + ### Entertainment @@ -54,13 +49,13 @@ The system supports live, recent, and upcoming game information for multiple spo - YouTube Music integration - Album art display - Now playing information with scrolling text -- ![DSC01354](https://github.com/user-attachments/assets/41b9e45f-8946-4213-87d2-6657b7f05757) + ### Custom Display Features - Custom Text display - Youtube Subscriber Count Display -- ![DSC01319](https://github.com/user-attachments/assets/4d80fe99-839b-4d5e-9908-149cf1cce107) + - Font testing and customization - Configurable display modes @@ -104,26 +99,64 @@ The system can be configured through a JSON configuration file that allows users Overall 2 Matrix display with Rpi connected. ![DSC00073](https://github.com/user-attachments/assets/a0e167ae-37c6-4db9-b9ce-a2b957ca1a67) - +----------------------------------------------------------------------------------- +# Preparing the Raspberry Pi +1. Create RPI Image on a Micro-SD card (I use 16gb because I have it, size is not too important but I would use 8gb or more) using [Raspberry Pi Imager](https://www.raspberrypi.com/software/) +2. Choose your Raspberry Pi (3B+ in my case) +3. For Operating System (OS), choose "Other", then choose Raspbian OS Lite (64-bit) +4. For Storage, choose your micro-sd card +![image](https://github.com/user-attachments/assets/05580e0a-86d5-4613-aadc-93207365c38f) +5. Press Next then Edit Settings +![image](https://github.com/user-attachments/assets/b392a2c9-6bf4-47d5-84b7-63a5f793a1df) +6. Inside the OS Customization Settings, choose a name for your device. I use "ledpi". Choose a password, enter your WiFi information, and set your timezone. +![image](https://github.com/user-attachments/assets/0c250e3e-ab3c-4f3c-ba60-6884121ab176) +7. Under the Services Tab, make sure that SSH is enabled. I recommend using password authentication for ease of use - it is the password you just chose above. +![image](https://github.com/user-attachments/assets/1d78d872-7bb1-466e-afb6-0ca26288673b) +8. Then Click "Save" and Agree to Overwrite the Micro-SD card. ----------------------------------------------------------------------------------- -## Installation +# System Setup & Installation -1. Clone this repository: +1. Open PowerShell and ssh into your Raspberry Pi with ledpi@ledpi + + +2. Update repositories, upgrade raspberry pi OS, install git +```bash +sudo apt update && sudo apt upgrade -y +sudo apt install -y git python3-pip cython3 build-essential python3-dev python3-pillow scons +``` + +3. Clone this repository: ```bash git clone https://github.com/ChuckBuilds/LEDMatrix.git cd LEDMatrix ``` -2. Install dependencies: +4. Install dependencies: ```bash -pip3 install --break-system-packages -r requirements.txt +sudo pip3 install --break-system-packages -r requirements.txt ``` --break-system-packages allows us to install without a virtual environment +5. Install rpi-rgb-led-matrix dependenices: +```bash +cd rpi-rgb-led-matrix-master +``` +```bash +sudo make build-python PYTHON=$(which python3) +``` +```bash +cd bindings/python +sudo python3 setup.py install +``` +Test it with: +```bash +python3 -c 'from rgbmatrix import RGBMatrix, RGBMatrixOptions; print("Success!")' +``` + ## Important: Sound Module Configuration 1. Remove unnecessary services that might interfere with the LED matrix: @@ -136,7 +169,11 @@ sudo apt-get remove bluez bluez-firmware pi-bluetooth triggerhappy pigpio cat < +# Example for user 'ledpi': +# sudo usermod -a -G gpio ledpi +``` + +**Important:** You must **reboot** the Raspberry Pi after adding the user to the group for the change to take effect. + +You also need to disable hardware pulsing in the code (see `src/display_manager.py`, set `options.disable_hardware_pulsing = True`). This may result in a flickerying display + +If configured correctly, you can then run: + +```bash +python3 display_controller.py +``` +----------------------------------------------------------------------------------- + + ## Project Structure ``` @@ -498,6 +586,22 @@ The project is organized into several key components: Each display module in `src/` is responsible for a specific feature (weather, sports, music, etc.) and follows a consistent pattern of data fetching, processing, and display rendering. +## NHL, NBA, MLB, Soccer, NCAA FB, NCAA Men's Baseball, NCAA Men's Basketball Scoreboard Display +The LEDMatrix system includes a comprehensive scoreboard display system with three display modes: + +### Display Modes +- **Live Games**: Shows currently playing games with live scores and game status +- **Recent Games**: Displays completed games from the last 48 hours (configurable) +- **Upcoming Games**: Shows scheduled games for favorite teams + +### Features +- Real-time score updates from ESPN API +- Team logo display +- Game status indicators (period, time remaining) +- Configurable favorite teams +- Automatic game switching +- Built-in caching to reduce API calls +- Test mode for development ## Caching System The LEDMatrix system includes a robust caching mechanism to optimize API calls and reduce network traffic: @@ -528,26 +632,3 @@ The LEDMatrix system includes a robust caching mechanism to optimize API calls a - Cache directory is created with proper permissions on first run - Temporary files are used for safe updates - JSON serialization handles all data types including timestamps - -## Fonts -You can add any font to the assets/fonts/ folder but they need to be .ttf or .btf(less support) and updated in display_manager.py - -### Running without Sudo (Optional and not recommended) - -To run the display script without `sudo`, the user executing the script needs access to GPIO pins. Add the user to the `gpio` group: - -```bash -sudo usermod -a -G gpio -# Example for user 'ledpi': -# sudo usermod -a -G gpio ledpi -``` - -**Important:** You must **reboot** the Raspberry Pi after adding the user to the group for the change to take effect. - -You also need to disable hardware pulsing in the code (see `src/display_manager.py`, set `options.disable_hardware_pulsing = True`). This may result in a flickerying display - -If configured correctly, you can then run: - -```bash -python3 display_controller.py -```