rahualrai / pi-calendar

This project allows you to view your upcoming events from Google Calendar on an external screen. By retrieving event data through the Google Calendar API, the Python script communicates with an Arduino board connected to an LCD screen, displaying the event details.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Google Calendar Display

This project retrieves the next upcoming event from your Google Calendar and displays it on an external screen via a serial connection. It consists of two files: lcd.ino and main.py. The Arduino code (lcd.ino) is responsible for setting up the LCD and receiving event data from the Python script. The Python script (main.py) utilizes the Google Calendar API to access upcoming event information and communicates with the serial device (e.g., an Arduino board) to show the event details.

Prerequisites

Before running the script, ensure that you have the following:

  • Python 3.x installed on your system
  • The required Python libraries installed. You can install them using the following command:
pip install google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-client pyserial python-dateutil

Setup

  1. Clone the repository or download the script files.

  2. Obtain the Google Calendar API credentials:

  • Go to the Google Cloud Console.
  • Create a new project or select an existing one.
  • Enable the Google Calendar API for your project.
  • Create credentials (OAuth client ID) and download the credentials file (JSON format).
  • Rename the credentials file to cred.json and place it in the project directory.
  1. Connect your Grove LCD to your computer via a serial connection.

  2. Adjust the baudrate if necessary:

  • Open the output() function in the main.py.
  • Modify the screen = serial.Serial(portVar, 9600) line to match the baudrate of your serial device.
  • Open lcd.ino and adjust the baudrate accordingly in line Serial.begin(9600);
  1. Run the script:
python main.py
  1. Follow the on-screen instructions to select the appropriate serial port where your external screen is connected.

  2. This will continuously check for the next event in your Google Calendar and display it on the external screen. The event details will update every minute.

Acknowledgments

This project utilizes the following libraries:

About

This project allows you to view your upcoming events from Google Calendar on an external screen. By retrieving event data through the Google Calendar API, the Python script communicates with an Arduino board connected to an LCD screen, displaying the event details.


Languages

Language:C++ 79.1%Language:Python 20.9%