Skip to content

slunak/led-clock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LED RGB Matrix Clock

Cloudy Rain Wind Wind

Note

Instructions may be incomplete as it has been a while since I set this up.

Hardware I use

Look for instructions on how to connect the screen to the Raspberry Pi online as this repo is not about wiring.

Software I use

You will need to build the Go executable on the Raspberry Pi itself.

Installation

  • sudo apt install build-essential
  • install Go
  • install SDL2 (refer to the SDL2 documentation and Google if any issues)

Build and run

  • go build
  • ./led-clock

This will run with the default configuration. You can pass the following flags to the executable:

  • -latitude - latitude of the location
  • -longitude - longitude of the location
  • -timezone - timezone of the location
sudo ./led-clock -latitude=52.3738 -longitude=4.8910 -timezone=Europe/Amsterdam

Run as a Service

I run the executable as a service. Here is an example of the service file:

[Unit]
Description=LED Clock
After=multi-user.target

[Service]
ExecStart=/home/serhiy/led-clock/led-clock -latitude=52.3738 -longitude=4.8910 -timezone=Europe/Amsterdam
WorkingDirectory=/home/serhiy/led-clock
KillMode=process
Restart=always
RestartSec=10
Type=simple
User=root
Environment="SDL_VIDEODRIVER=dummy"

[Install]
Alias=led-clock.service

Configuration

Look at config.go file to change some configuration parameters of the clock. E.g. weather units.

Note

  • Works only with 64x64 LED screen. May be adopted for other screens.
  • Must be run as root.
  • Must be run with SDL_VIDEODRIVER=dummy environment variable if no display is available.
  • XDG_RUNTIME_DIR=/run/user/1000 may need to be set.
  • Using Echo Go library with the idea to extend the clock with http commands.

About

LED RGB Matrix Clock

Resources

License

Stars

Watchers

Forks

Languages