josephgeis / clock

A clock for Pimoroni's Display-O-Tron HAT (for Raspberry Pi)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

clock :octocat:

A clock for Pimoroni's Display-O-Tron HAT (for Raspberry Pi)

Say Thanks!

Installation 📦

git clone https://github.com/juniorRubyist/clock.git
cd clock
./install.sh # Follow onscreen instructions

Please leave a star, it means a lot to me.

Upgrade ⬆️

git pull # While in project directory
./install.sh

Features

  • Absolutely no logic for accurate time updates.
  • Runs in background, with help from screen.
  • Can run on startup, with crontab configuration.
••••••••••••••••••
•    02:47 pm    • Local Time
•     ••••••     • Binary Seconds
•  Jun 08, 2017  • Local Date
••••••••••••••••••

Usage

Commands ⌨️

To start clock, execute:

clock

To attach to the clock process, execute:

screen -r clock

To kill the clock, execute:

screen -r clock
# Send a SIGINT (^C), SIGTSTP (^Z), or SIGKILL (^\\)

Other Usage 💡

To initiate the backlight, press the center button.

To switch backlight colors, press the left/right buttons, when not glowing.

Hacking 🔨

Adding Colors

  1. Fork the repo (not required, but recommended) and clone it, or pull the latest changes (if you don't want to fork it).
  2. Open share/clock.py with an editor.
  3. Find the colors list and add a dictionary with the following syntax (which is similar to JSON).
{'name' : color_name, 'combo' : (r, g, b)}

⚠️ Warning: It is imperative that color_name is a string and the value of combo is a tuple. 4. Save the file and reinstall (run ./install.sh). Note: Make sure you kill the existing process.

Sharing Edits and Feature Requests

To share an edit, please push your changes and file a pull request. If you have a good idea, but don't know how to add it, file an issue. If accepted, we'll add it to the Next Steps project.

Do you love this? ❤️

If you have enjoyed this project, please leave a star or a comment on my Say Thanks page. You can also donate Bitcoin to the address below 👇.

1JS7RBqqWu5oCUzNfJnAHfkxBC5cPRew8u

Contributions

Coded with love from California.

About

A clock for Pimoroni's Display-O-Tron HAT (for Raspberry Pi)

License:MIT License


Languages

Language:Python 63.0%Language:Shell 37.0%