Skip to content

Latest commit

 

History

History
58 lines (37 loc) · 1.69 KB

README.md

File metadata and controls

58 lines (37 loc) · 1.69 KB

Raspberry Pi ZeroW LED Christmas Tree

Small LED Christmas tree with a 7-segment display counting down the time to Christmas day.

Hardware and OS info:

cat /proc/cpuinfo | grep "Model"
Model		: Raspberry Pi Zero W Rev 1.1

hostnamectl | grep "Operating System"
Operating System: Raspbian GNU/Linux 11 (bullseye)

Note: In order to get the current date and time, the Pi must be able to connect to a network.

Venv setup

# Creating the venv in repo directory
python3 -m venv .venv

# Activating
source ./.venv/bin/activate

# Install from requirements.txt
pip install -r ./requirements.txt

ZeroSeg needs to be installed from it's repo shown below.

7-segment display

ZeroSeg library from git here.
The instructions in the README are excellent. The steps I performed are summarised below:

  • Clone the repo and navigate into it.
  • With .venv activated, sudo python3 setup.py install. This should install the package within your virtual environment.

The ZeroSeg README has loads of step-by-step detail if you need more info or need to troubleshoot. There are also some example scripts to test your installation.

Your virtual environment should have everything it needs now to run the display and any scripts in this repo.

Running notes

  • To run tests, activate .venv and run python3 -m pytest tests.
  • ./run_xmastree.sh is a simple bash script to run both the lights and the display as separate background python processes. This is used by crontab.

Line added to crontab:

@reboot /home/pi/pi_xmas_tree/run_xmastree.sh

Happy Holidays!


END.