Chuck cdcf6a1d7a Update display_manager.py
turn off refresh rate display
2025-04-07 20:08:19 -05:00
2025-04-07 19:16:31 -05:00
2025-04-07 20:08:19 -05:00
2025-04-07 16:44:16 -05:00
2025-04-07 19:16:31 -05:00
2025-04-07 20:04:55 -05:00
2025-04-07 19:13:59 -05:00

LED Matrix Clock

A simple, modular clock application for Raspberry Pi using Adafruit LED Matrix displays.

Hardware Requirements

  • Raspberry Pi 3
  • 2x Adafruit 64x32 LED Matrices
  • Adafruit Pi LED Matrix Bonnet

Installation

  1. Install required system packages:
sudo apt-get update
sudo apt-get install -y python3-pip python3-dev python3-setuptools
sudo apt-get install -y build-essential git
sudo apt-get install -y python3-pil python3-pil.imagetk
sudo apt-get install -y cython3
  1. Install the rpi-rgb-led-matrix library and Python bindings:
# Make sure you're in the main project directory
cd ~/LEDSportsMatrix/rpi-rgb-led-matrix-master

# Build the C++ library first
make

# Build and install Python bindings
cd bindings/python
sudo python3 setup.py install
cd ../..

# Install the library files
sudo cp -r lib/* /usr/local/lib/
sudo cp -r include/* /usr/local/include/
sudo ldconfig
cd ..
  1. Install additional Python packages:
sudo python3 -m pip install pytz
  1. Install the DejaVu Sans font:
sudo apt-get install -y fonts-dejavu

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. Save and reboot:

sudo reboot

Configuration

Edit the config/config.json file to customize:

  • Timezone
  • Display settings (brightness, dimensions)
  • Clock format and update interval

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

Running the Clock

The program must be run with root privileges to access the LED matrix hardware:

cd src
sudo python3 display_controller.py

To stop the clock, press Ctrl+C.

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%