Skip to content

Commit

Permalink
Merge pull request #28 from mendhak/raspios
Browse files Browse the repository at this point in the history
Updated and simplified instructions for Raspberry Pi OS.
  • Loading branch information
mendhak authored Dec 29, 2021
2 parents d5156a1 + f6f30c9 commit 86619c5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 2021-12-29

* Updated instructions for Raspberry Pi OS Bullseye. Many dependencies stopped working, fixed it now.
* Removed some dependencies that aren't needed anymore! BCM not needed. WiringPi is deprecated. LibJpeg doesn't look needed.
* Replace Inkscape with CairoSVG. Inkscape broke some commandline args, and CairoSVG seems better suited for commandline anyway.
* Updated Google Calendar instructions, it's simpler for now, until Google break their URLs again.

## 2021-10-29

* Bug fix - Outlook calendar entries will now show in local time, instead of UTC.
Expand Down
25 changes: 9 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,29 +45,19 @@ Connect the ribbon from the epaper display to the extension. To do this you wil

## Setup dependencies

sudo apt install git ttf-wqy-zenhei ttf-wqy-microhei python3 python3-pip python-imaging libopenjp2-7-dev libjpeg8-dev inkscape figlet wiringpi
sudo pip3 install python-dateutil astral spidev RPi.GPIO Pillow # Pillow took multiple attempts to install as it's always missing dependencies
sudo pip3 install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib msal
sudo apt update && sudo apt upgrade
sudo apt install git python3 python3-pip cairosvg pigpio python3-pigpio
sudo pip3 install python-dateutil astral spidev RPi.GPIO Pillow google-api-python-client google-auth-httplib2 google-auth-oauthlib msal
sudo sed -i s/#dtparam=spi=on/dtparam=spi=on/ /boot/config.txt #This enables SPI
sudo reboot

### Get the BCM2835 driver

wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.58.tar.gz
sudo tar zxvf bcm2835-1.58.tar.gz
cd bcm2835-1.58/
sudo ./configure
sudo make
sudo make check
sudo make install

## Using this application

### Clone it

git clone this repository in the `/home/pi` directory.

cd /home/pi
cd ~
git clone --recursive https://github.com/mendhak/waveshare-epaper-display.git

This should create a `/home/pi/waveshare-epaper-display` directory.
Expand Down Expand Up @@ -165,9 +155,12 @@ export [email protected]
#### Google Calendar token

The Oauth process needs to complete once manually in order to allow the Python code to then continuously query Google Calendar for information.
Go to the [Python Quickstart](https://developers.google.com/calendar/quickstart/python) page and enable Google Calendar API. When presented, download or copy the `credentials.json` file and add it to this directory.

Next, SSH to the Raspberry Pi and run
Go to the [Google Cloud Platform library page](https://console.cloud.google.com/apis/library), search for and enable the [Calendar API](https://console.cloud.google.com/apis/api/calendar-json.googleapis.com/overview).

Next, head over to the [API Dashboard Credentials page](https://console.cloud.google.com/apis/credentials), and create new credentials of type "OAuth Client ID". For application type, choose "Desktop app" and give it a name such as "Epaper Display". When presented, download or copy the `credentials.json` file and add it to this directory.

You can now kick off the authentication process. On the Raspberry Pi, run:

python3 screen-calendar-get.py

Expand Down
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ else
WAVESHARE_HEIGHT=480
fi

inkscape screen-output-weather.svg --without-gui -e screen-output.png -w$WAVESHARE_WIDTH -h$WAVESHARE_HEIGHT --export-dpi=300
cairosvg -o screen-output.png -f png --dpi 300 --output-width $WAVESHARE_WIDTH --output-height $WAVESHARE_HEIGHT screen-output-weather.svg

log "Display on epaper"
python3 display.py screen-output.png

0 comments on commit 86619c5

Please sign in to comment.