Alcoclock: It's 5 O'Clock Somewhere πŸΈπŸ•”

by jampez77 in Circuits > Raspberry Pi

86 Views, 2 Favorites, 0 Comments

Alcoclock: It's 5 O'Clock Somewhere πŸΈπŸ•”

_6HwhFKu6au.jpg

Alcoclock is a Pi Zero project that checks where in the world it's 5PM, then displays a random, excuse to start drinking.


One day he phrase "It's 5 o'clock somewhere" popped into my head which got me wondering. "Where is it actually 5PM right now?".I thought that there must be a website, app or gadget that could tell me. But after a lengthy, detailed search, where I actually went to page 2 on Google, I realised nothing existed.So I decided to make it myself.Using a Raspberry Pi Zero and an e-Paper display from Waveshare, I built Alcoclock, a device that checks every hour where in the world it's currently 5PM, and shows a cheeky pun-filled message to justify whatever beverage-related decisions you're about to make.

Supplies

  1. Raspberry Pi Zero Wireless
  2. Waveshare 2.15 inch e-Paper Display

Install Required Libraries

sudo apt-get update
sudo apt-get install python-pip
sudo apt-get install python-pil
sudo apt-get install git
sudo pip install RPi.GPIO
sudo pip install tzlocal
sudo pip install pytz
sudo pip install pycountry

or

sudo apt-get update
sudo apt-get install python3-pip
sudo apt-get install python3-pil
sudo apt-get install python3-git
sudo pip3 install RPi.GPIO
sudo pip3 install tzlocal
sudo pip3 install pytz
sudo pip3 install pycountry

Enable SPI

sudo raspi-config
  1. Select "Interfacing Options"
  2. Highlight the "SPI" option and activate "<Select>"
  3. Select and activate "<Yes>"
  4. Highlight and activate "<Ok>"
  5. If prompted to reboot highlight and activate "<Yes>"

Clone the Waveshare E-Paper Repo

git clone https://github.com/waveshareteam/e-Paper

Create the Alcoclock Script

sudo nano alcoclock.py
  1. Copy and paste the attached code into the newly created file.
  2. Press "Ctrl + x" to save then "Y" to exit.

Downloads

Test the Script (optional)

python3 alcoclock.py

Getting It to Run on Boot and on the Hour, Every Hour

crontab -e

This will open a file, here we can tell the Pi to run our script when the pi is first switched on, with a 30 second delay, and on the hour, every hour.

0 * * * * /usr/bin/python3 /home/pi/alcoclock.py
@reboot sleep 30 && /usr/bin/python3 /home/pi/alcoclock.py

Reboot the Pi

sudo reboot

Drink

whatsapp_image_2025-07-11_at_11_52_20_(1)_DmTpurLZDy.jpg