Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

jduffey/unicornhat-scripts

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unicornhat-scripts

Scripts designed for the Pimoroni Unicorn HAT HD Raspberry Pi display module.

Instructions

Set up virtual environment

  • python3 -m venv --system-site-packages venv
    • This command gives our virtual environment access to system-install packages which are needed by Numpy.
  • source venv/bin/activiate

Install dependencies

  • pip3 install -r requirements.txt

Run script

  • python3 eth_base_fee.py

Instructions for running automatically when Raspberry Pi starts

Create the .service file

  • Create /etc/systemd/system/unicornhathd.service with the following contents.
  • Make sure to replace the script paths and user with the correct values for your system!
[Unit]
Description=Unicorn HAT HD Service
After=network.target

[Service]
ExecStart=/usr/bin/python3 /path/to/your/python/script.py
WorkingDirectory=/path/to/your/python/
StandardOutput=inherit
StandardError=inherit
Restart=always
User=pi

[Install]
WantedBy=multi-user.target

Configure the service to start on boot

  • systemctl enable unicornhathd.service
    • This command adds the service to the directory indicated in the .service file; in this case we install the service at /etc/systemd/system/multi-user.target.wants

Notes

These instructions were tested on the Raspbian GNU/Linux 11 (bullseye) operating system.

To view to status of the service:

  • systemctl status unicornhathd.service

To view logs of the service (for troubleshooting/debugging):

  • journalctl -u unicornhathd.service

About

Scripts designed for the Pimoroni Unicorn HAT HD Raspberry Pi display module.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.