Pimorini Inky PHAT with Google Calender

08 Apr 2019

It has been a year since I posted here and since that time I have moved house and am no longer running a ruby web server from the house. But I do not want to give up posting here so I have put together a little python script which lists your most recent events you have put on the Google Calendar.

drawing

Now some of this code is pulled from the quickstart.py program found on the Google Calendar Developers page at https://developers.google.com/calendar/quickstart/python . This program lists how to pull the events from your own Google Calendar. There is also a step listed (Called ENABLE GOOGLE CALENDAR API) here which you will need to carry out to produce your own credentials.json file. You will need this file later on.

The next step is to enable the Inky python library produced by Pimorini. This code uses the small EInk Display designed for the Raspberry PI. It is designed for the Raspberry PI Zero but you can see from my screenshot that I use it on the full sized Raspberry PI 3. Now follow the instructions that are required to install this library detailed on https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-inky-phat . There will be a few pip installs for various libraries but they have an shell installation script to guide you through this.

The next step is to download the code I have on github https://github.com/emomonkey/pimorini_inkygooglecalendar. Replace the blank credentials.json file with the one you generated earlier on.

To run the script type python quick_start.py and the small eink display will change every 15 seconds cycling through your next 10 events you have listed on Google Calendar. The program will run forever and poll Google for any updates to your calendar. You may want to have it start on booting up your Raspberry PI so you would want to set up a cron job for this.

One of this disadvantages of this current script is that it change the display cycle or the polling to Google cycle you need to change the variables within the script. You would want to change this script to pull the files in from an external file if I don’t get round to it. I think building a nice frame for this disply would make it into something useable so I’ll see if I can find something that would like now in a living room or kitchen.

Published on 08 Apr 2019 Find me on Twitter!