Chuck 3d662baf54 Stocks (#2)
* Opening Bell

Introducing the Stock Ticker Feature

* Update stock_manager.py

Assume folder exists

* Update stock_manager.py

removing logos to focus on function for now

* Update stock_manager.py

parse yahoo scripts

* Update stock_manager.py

stock query update

* Update stock_manager.py

slow down stock display

* Update display_controller.py

adjust screen flow

* Update stock_manager.py

shipping features

* Update stock_manager.py

stock refresh in the background

* Customize Display timings

customize display timings

* Update stock_manager.py

stock font size change

* Sizing and Spacing

CHanged font sizing on chart and clock spacing

* Update clock.py

Date format changes

* Update stock_manager.py

actually read stocks from config file

* Update stock_manager.py

add config manager

* readme update

readme update and formatting for better flow

* Update .gitignore

rename reference folder

* Update config.json

changed default stocks to test update implementation

* Stock News

Stock news Ticker

* Update config.json

increase scroll speed

* Scroll Performance

Tuning news scrolling performance

* updating scroll direction

orienting scroll direction

* News tuning

removed test files and increased scroll speed

* Create test_news_manager.py

need a test script to call upon

* Update test_news_manager.py

test script tuning

* troubleshooting test script

* Update test_news_manager.py

* Update config.json

scroll speed increases

* Update config.json

scroll tuning

* Update config.json

speeding up

* Update config.json

still making text faster

* Update config.json

Trying to tune scrolling

* Update config.json

testing crazy parameters

* Update test_news_manager.py

remove sleep delay

* scroll tuning

scroll tuning

* scroll logging and debugging

FPS counter and debug messages

* Update config.json

matrix speed tuning

* Update news_manager.py

News separator

* Update news_manager.py

separator character change

* Stock News manager Rename

rename stock news ticker to enable other news in the future

* Update display_controller.py

load config update

* Update stock_manager.py

remove redundant import

* Stock news settings

Stock news has more granular control

* Stock news joins the lineup

Stock News added to the display controller and drawing display instead of image

* Optimize scrolling text performance for news ticker

* Adjust matrix settings to reduce artifacting while maintaining performance

* changed float to integer

* Fix news ticker performance with simplified scrolling mechanism

* Fix stock news scrolling in test environment: - Optimize display manager settings for smooth scrolling - Add proper display initialization and cleanup in test script - Implement timing control to prevent display buffer overflow - Ensure consistent 1ms delay between updates for smooth scrolling

* Optimize stock news scrolling for better performance: - Use pre-rendered text image for efficient scrolling - Implement cropping and pasting for smoother animation - Remove unnecessary display operations and delays

* Optimize stock news display performance: - Cache text image to reduce rendering overhead - Improve frame creation and update logic - Optimize text wrapping for smoother scrolling - Remove unnecessary display clears

* Optimize stock news display in controller: - Remove global sleep delay - Allow news display to run at full speed - Keep slower update rates for other displays

---------

Signed-off-by: Chuck <33324927+ChuckBuilds@users.noreply.github.com>
2025-04-11 11:10:50 -05:00
2025-04-08 19:10:57 -05:00
2025-04-11 11:10:50 -05:00
2025-04-11 11:10:50 -05:00
2025-04-07 16:44:16 -05:00
2025-04-10 22:16:38 -05:00
2025-04-10 22:16:38 -05:00
2025-04-10 18:42:38 -05:00
2025-04-07 19:13:59 -05:00
2025-04-11 11:10:50 -05:00

LEDMatrix

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

  1. Clone this repository:
git clone https://github.com/ChuckBuilds/LEDMatrix.git
cd LEDMatrix
  1. Install dependencies:
pip3 install --break-system-packages -r requirements.txt

--break-system-packages allows us to install without a virtual environment

Configuration

  1. Copy the example configuration:
cp config/config.example.json config/config.json
  1. Edit config/config.json with your preferences

API Keys

For sensitive settings like API keys:

  1. Copy the template: cp config/config_secrets.template.json config/config_secrets.json

  2. Edit config/config_secrets.json with your API keys via sudo nano config/config_secrets.json

  3. Ctrl + X to exit, Y to overwrite, Enter to save

Important: Sound Module Configuration

  1. Remove unnecessary services that might interfere with the LED matrix:
sudo apt-get remove bluez bluez-firmware pi-bluetooth triggerhappy pigpio
  1. Blacklist the sound module:
cat <<EOF | sudo tee /etc/modprobe.d/blacklist-rgb-matrix.conf
blacklist snd_bcm2835
EOF

sudo update-initramfs -u
  1. Reboot:
sudo reboot

Performance Optimization

To reduce flickering and improve display quality:

  1. Edit /boot/firmware/cmdline.txt:
sudo nano /boot/firmware/cmdline.txt
  1. Add isolcpus=3 at the end of the line

  2. Add dtparam=audio=off at the end of the line

  3. Ctrl + X to exit, Y to save

  4. Save and 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

Project Structure

  • src/
    • clock.py - Main clock application
    • config_manager.py - Configuration management
    • display_manager.py - LED matrix display handling
  • config/
    • config.json - Configuration settings
    • config_secrets.json - Private settings (not in git)
Description
Raspberry Pi LED Matrix Project
Readme GPL-3.0 205 MiB
Languages
Python 58.8%
JavaScript 18.6%
HTML 15.8%
Shell 6.1%
CSS 0.7%