First you'll need to install the Adafruit_Blinka library that provides the CircuitPython support in Python. This may also require enabling SPI on your platform and verifying you are running Python 3. Since Linux changes often, please visit the CircuitPython on Linux guide to get your computer ready!
Next you will want to upload the credentials.json file that you saved in the last steps to your Pi into the main folder that you will be running your script. A good place is inside of /home/pi.
There is one last set of packages that you will need to install in order to run this project:
pip3 install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
If you haven't done so already, be sure your timezone is set correctly. A freshly setup Raspberry Pi is usually set to GMC by default. You can change it by typing:
Then select Localisation Options and Change Time Zone. This will ensure that everything displays with the correct time and date. You can find more information about using raspi-config in the official documentation.
In order to communicate with the Google Calendar API, you will need what is called an OAuth token. The first time you run the script (available on the Event Calendar Code page of this guide), you will be given a URL that you can paste into your browser to finish the token setup procedure. Go ahead and upload the script to the same folder that you uploaded the credentials file. Run the script by typing the following:
If you haven't previously run the script, you will be taken through a process that generates an OAuth token, which allows the application to communicate with the Google Calendar API securely.
The script should provide a URL to visit to generate the token. Go ahead and copy and paste the URL into a browser.
You may run into an alert that says your app isn't verified. Go ahead and click on the Advanced link.
That will expand the dialog. Click Go to Quickstart (unsafe) or whatever you decided on for a project name.
After all that, it will come up with a confirmation dialog with your account name and the permissions that you are granting. Go ahead and click on Allow.
Finally, you will be given an Authorization Code. Click on the Copy icon and it will get copied to your clipboard.
Paste the Authorization Code back into the Python script and the token will be generated and saved for next time.
The script will automatically resume and your E-Ink display should be updated with the next event in your calendar.