Skip to content

Latest commit

 

History

History
73 lines (46 loc) · 2.24 KB

README.md

File metadata and controls

73 lines (46 loc) · 2.24 KB

sky-pi-draw

Handles rendering the weather screenshots to the Pimoroni Inky Impressions 7.3" 800x480 e-ink display.

Important

Before running, make sure you have I2C and SPI enabled on your Raspberry Pi!

How to enable I2C and SPI

  1. Running the following:
sudo raspi-config
  1. In the shown menu, go to "Interface Options" (should be list item #3)

  2. Enable SPI (item I4) and I2C (item I5)

Development

To get up and running, first make sure you're running on a linux system as the inky package used by this project requires the linux kernel specific SPI library.

With that out of the way, here's how you get started:

  1. Make sure you're running python 3.11 (version shipped with raspbian)

  2. Run the following to create a new virtual environment

python -m venv .venv
  1. Activate the newly created virtual environment
source .venv/bin/activate
  1. Install the project's dependencies
python -m pip install .
  1. Run draw.py
python src/sky_pi_draw/draw.py

Troubleshooting

Some general guidance for how to deal with issues found during development

Using a Raspberry Pi 5

If you're using an RP5 and are running into problems connecting to the display when running the sky-pi-draw, you might need to install the new python specific GPIO package for Raspberry Pi. You can do this by running:

sudo apt remove python3-rpi.gpio
sudo apt install python3-rpi-lgpio

If you're still running into issues, you can try removing the RPi.GPIO package used by sky-pi-draw by default and instead use rpi-lgpio. You can do do this by running:

sudo apt remove python3-rpi.gpio
pip3 install rpi-lgpio

Warning

Make sure you've removed RPi.GPIO before you try to run the program. Both the original RPi.GPIO and rpi-lgpio attempt to install a module named RPi.GPIO so having them both installed at the same time will cause issues.