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
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
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
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
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
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
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
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!
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!