Skip to content
/ mcal Public

An in real life implementation of Google's Magic Calendar concept powered by Raspberry Pi Pico W and Pervasive Displays 12" E ink screen

License

Notifications You must be signed in to change notification settings

lee-pham/mcal

Repository files navigation

Magic Calendar

Magic Calendar

Hardware Required

Some features of the calendar:

  • Since I had the luxury of using red for the E-Ink display, I used it to highlight the current date, as well as recently added/updated events.
  • Given limited space (oh why are large E-Ink screens still so expensive!) and resolution on the display, I could only show 3 events per day and an indicator (e.g. 4 more) for those not displayed
  • The calendar always starts from the current week, and displays the next four (total 35 days). If the dates cross over to the new month, it's displayed in grey instead of black.
  • Timeline added to the bottom to closely honor the original concept

Setting up the calendar

  1. Start by flashing Raspberrypi OS Lite to a MicroSD Card.

  2. After setting up the OS, run the following command in the RPi Terminal, and use the raspi-config interface to setup Wifi connection, enable SSH, I2C, SPI, and set the timezone to your location.

sudo raspi-config
  1. Run the following commands in the RPi Terminal to setup the environment to run the Python scripts.
sudo apt install chromium-chromedriver libatlas-base-dev
  1. Clone the repo and create and activate a virtual environment and install dependencies
cd mcal/
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
  1. Download the files in this repo locally to your computer (not the pi).

  2. In order for you to access your Google Calendar events, it's necessary to first grant the access. Follow the instructions here on your PC to get the credentials.json file from your Google API. Don't worry, take your time. I'll be waiting here.

  3. Once done, copy the credentials.json file to the "gcal" folder in this project. Run the following command on your PC. A web browser should appear, asking you to grant access to your calendar. Once done, you should see a "token.pickle" file in your "gcal" folder.

python3 quickstart.py
  1. Copy all the files over to your RPi using your preferred means.

  2. Run the following command in the RPi Terminal to open crontab.

crontab -e
  1. Specifically, add the following command to crontab so that the MagInkCal Python script runs every 5 minutes.
*/5 * * * * cd /home/pi/mcal/ && /home/pi/mcal/venv/bin/python /home/pi/mcal/maginkcal.py

Acknowledgements

  • MagInkCal: Built out the initial concept and is the backbone of this code
  • Bootstrap Calendar CSS: Stylesheet that was adapted heavily for the calendar display
  • emagra: For adding in new features, such as 24hr display and multiple calendar selection.
  • /u/aceisace: For the tips on E-Ink development and the InkyCal repo (worth checking out even though I didn't use it for this project).

About

An in real life implementation of Google's Magic Calendar concept powered by Raspberry Pi Pico W and Pervasive Displays 12" E ink screen

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •