Skip to content

Commit 86619c5

Browse files
authored
Merge pull request #28 from mendhak/raspios
Updated and simplified instructions for Raspberry Pi OS.
2 parents d5156a1 + f6f30c9 commit 86619c5

3 files changed

Lines changed: 17 additions & 17 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 2021-12-29
2+
3+
* Updated instructions for Raspberry Pi OS Bullseye. Many dependencies stopped working, fixed it now.
4+
* Removed some dependencies that aren't needed anymore! BCM not needed. WiringPi is deprecated. LibJpeg doesn't look needed.
5+
* Replace Inkscape with CairoSVG. Inkscape broke some commandline args, and CairoSVG seems better suited for commandline anyway.
6+
* Updated Google Calendar instructions, it's simpler for now, until Google break their URLs again.
7+
18
## 2021-10-29
29

310
* Bug fix - Outlook calendar entries will now show in local time, instead of UTC.

README.md

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,29 +45,19 @@ Connect the ribbon from the epaper display to the extension. To do this you wil
4545

4646
## Setup dependencies
4747

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

54-
### Get the BCM2835 driver
55-
56-
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.58.tar.gz
57-
sudo tar zxvf bcm2835-1.58.tar.gz
58-
cd bcm2835-1.58/
59-
sudo ./configure
60-
sudo make
61-
sudo make check
62-
sudo make install
63-
6454
## Using this application
6555

6656
### Clone it
6757

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

70-
cd /home/pi
60+
cd ~
7161
git clone --recursive https://github.com/mendhak/waveshare-epaper-display.git
7262

7363
This should create a `/home/pi/waveshare-epaper-display` directory.
@@ -165,9 +155,12 @@ export GOOGLE_CALENDAR_ID=xyz12345@group.calendar.google.com
165155
#### Google Calendar token
166156

167157
The Oauth process needs to complete once manually in order to allow the Python code to then continuously query Google Calendar for information.
168-
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.
169158

170-
Next, SSH to the Raspberry Pi and run
159+
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).
160+
161+
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.
162+
163+
You can now kick off the authentication process. On the Raspberry Pi, run:
171164

172165
python3 screen-calendar-get.py
173166

run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ else
2323
WAVESHARE_HEIGHT=480
2424
fi
2525

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

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

0 commit comments

Comments
 (0)