Raspberry Pi4 15.6-inch IPS HDMI Touch Screen Google Calendar

by thamerfallatah83 in Workshop > Electric Vehicles

1211 Views, 6 Favorites, 0 Comments

Raspberry Pi4 15.6-inch IPS HDMI Touch Screen Google Calendar

ca8fd2dc-35b1-48cf-81bd-cb0079813144.jpg
6856bd8d-504d-40c4-8065-6be7b5fd07ff.jpg

You'll never need to buy another calendar again. This is a Raspberry Pi calendar that can sit on your desk, nightstand, or even be mounted on the wall. The Pi is synced with Google Calendar—making it easy to update from any device, display events for your family, and see changes in real time! Want to update your calendar? Just use your phone!

We only need a few things to get started. You'll need a Raspberry Pi, I'm using a Raspberry Pi 4 model. As far as a display is concerned, you can use any screen you like. I have 15.6-inch IPS HDMI Touch Screen that connects using HDMI. It comes with a small stand, making it a perfect desktop calendar. However, you could easily go one step further and use a wall mounted display.

JUMP TO STEP:

1-Install and update Raspberry Pi OS

2-Connect the screen and turn on the Pi

3-Configure Chromium for your Google Calendar

4-Create a custom bootup script

5-Disable sleep mode

6-Auto-hide the taskbar

7-Hide the cursor on boot

8-Splash Screen

9-Mark your calendar—it’s done!

Supplies

1- Raspberry Pi 4

1- Body case for Raspberry Pi

1- keyboard and mouse wireless type

1- 15.6 Inch IPS HDMI Display USB Capacitive Touch Screen 1920×1080

1- Cable HD communication

Install and Update Raspberry Pi OS

297ca816-f1ff-4549-96ca-51357dc7c225.jpg
Screenshot 2021-12-06 103415.jpg
334ab761-4677-464f-8cd1-39034ef612bc.jpg

We'll need a fresh OS to get started. I'll be using Raspberry Pi OS (formerly Raspbian)

You can easily install Raspberry Pi OS using the Raspberry Pi Imager. This is an official imaging application that makes the microSD card flashing process much easier and more welcoming to new users. You can find a thorough overview of how to use the Raspberry Pi Imager here.

How to Use Raspberry Pi Imager

New official Raspberry Pi imaging software.

Download the Raspberry Pi Imager installer for your Operating System from the Raspberry Pi downloads page.https://www.raspberrypi.org/downloads

Run the installer and complete the setup by following the prompts.

Launch Raspberry Pi Imager and click Choose OS.

Select Raspberry Pi OS from the list.

Click Choose SD card and choose the microSD card you want to flash the new OS to and click Write.

When the imager is finished, you can connect your microSD card to the Pi and boot it up.

Connect the Screen and Turn on the Pi

7588a90c-b8d0-40c5-b3de-a9b173a1b62c.jpg
a260ee7f-459a-467d-8e03-248169a834d4.jpg
88f71606-239f-4061-a670-624e35ae2fa7.jpg

Once you have Raspberry Pi OS installed, it's time to plug in our peripherals. Connect the screen to the Pi and plug in the power adapter.

Configure Chromium for Your Google Calendar

Launch the chromium browser and access https://calendar.google.com. Log into your Google account and save the authentication information in Chromium. This will ensure your account is logged in each time the browser is launched.

Create a Custom Bootup Script

72b948af-4d85-4cb8-bf60-ce25d0f8729e.jpg
c079207b-3678-44e8-a631-1d84a7c90d1b.jpg

Next, we'll tell the Pi to open Chromium to the Google Calendar page every time it's powered on.

To accomplish this, we will create a startup script that launches everything for us.

Create the startup script You can use any text editor you like, I'll be using Notepad++.

Create a file with the following script.

Note: Chromium has trouble rendering the Calendar properly, this is resolved by running Chromium with a different user agent.

You don’t need to do anything extra for this, I included the user agent information in the script below.

Feel free to experiment with other user agents.

chromium-browser https://calendar.google.com --user-agent="Mozilla/5.0 (Windows; U; Windows NT 6.1; rv:2.2) Gecko/20110201" --disable-infobars --disable-session-crashed-bubble --kiosk &

Enter a filename like startup and save it with a .shfile extension. Drop the file in the /home/pi/ directory.

Edit the autostart file Now we need to tell the Pi to use our new script when it turns on. We'll do this by editing the autostart file. Connect to the Pi using a terminal, like PuTTY, and run the following command.

sudo nano ~/.config/lxsession/LXDE-pi/autostart

At the bottom of the file, include the following string. Be sure to replace startup.sh with the filename you chose.

@sh /home/pi/startup.sh

Save the file using ctrl+x, press y, then enter.

Disable Sleep Mode

ab1de0d2-2818-4c78-bc38-e513dc04e09a.jpg
ab1de0d2-2818-4c78-bc38-e513dc04e09a.jpg

The Pi will disable the screen display automatically. It's rather difficult to check a calendar that isn't there, so we'll need to turn it off entirely. To do this, connect to the pi using a terminal, like PuTTY, and run the following command.

sudo nano ~/.config/etc/xdg/lxsession/LXDE-pi/autostart

At the bottom of the file, include the following.

@xset s 0 0

@xset s noblank

@xset s noexpose

@xset dpms 0 0 0

Save the file using ctrl+x, press y, then enter.

Auto-hide the Taskbar

We will need to hide our taskbar so it doesn't interfere with our display. Right click an empty place on the task bar and choose Panel Settings. Under the Advanced tab, select the option to Minimize panel when not in use.

Hide the Cursor on Boot

2d06e2ea-4e44-470f-b427-842610a75ef6.jpg

We’ll use a program called unclutter to hide our cursor. Install it using the following command.

sudo apt-get install unclutter

Next we'll need to update our autostart file. Access it again using the following command.

sudo nano ~/.config/etc/xdg/lxsession/LXDE-pi/autostart

At the bottom of the file, include this string.

@unclutter -idle 0

Save the file using ctrl+x, press y, then enter.

Splash Screen

3b5888eb-4e4f-40bc-a4db-b6bd252bf420.jpg
logoooo-1.png
Splash Screen

How to Replace the Raspberry Pi Splash Screen Image

1.In your favorite image editor create a splash screen and save it as splash.png We chose a 1920 x 1080 resolution as it scales well with 16:9 resolutions.

2. Copy the image to a USB flash drive and insert the drive into the Raspberry Pi.

3. Copy splash.png from the USB flash drive to your home directory /home/pi/

4. Open a Terminal and change directory to the location of the original splash screen for your Pi.

$ cd /usr/share/plymouth/themes/pix/

5. Backup the original splash.png file to a file called splash.png.bk.

$ sudo mv splash.png splash.png.bk

6. Copy your splash.png to the current directory. This will copy the freshly created splash image ready for use.

$ sudo cp /home/pi/splash.png ./

7. Reboot your Raspberry Pi.

Once your Raspberry Pi reboots you will see the familiar rainbow screen, and then a few seconds later you will see your custom splash screen.

Mark Your Calendar—it’s Done!

d1f59426-4f0f-44a2-a6d2-b305f46b0c90.jpg
ff3cf09f-13ca-47fe-be1f-1950a1ddfc0a.jpg

Restart the Raspberry Pi for a final test of your work. If everything works, the calendar should launch in full screen with no errors and a hidden cursor.

Congratulations! You've created your own automated Raspberry Pi calendar. Now it’s time to set it up and enjoy your new device. Good work!