Skip to main content
<TheTechWiz/>
Back to Arduino Projects
Completed

Arduino Clock

An Arduino-based clock with different features.

The Idea

I wanted to have a device, that could show me the date, time, and sunset/sunrise times. I didn't want to keep having to look around for a screen that would tell me, so I built my own.

Note: I didn't code this myself, I vibe coded the software, but I designed the hardware and 3D printed the case myself.

How It Works

On startup, the ESP32 starts up as an AP (access point), allowing you to connect to it and configure the WiFi and location. With the location, it is able to get the current sunrise and sunset based on your city, along with the UTC time. Once finished configuring, it stops the AP mode, and gets you the current local time. In addition with displaying the time, on double-tap, it also shows you the sunrise and sunset times. On long-press, the display turns off, allowing you to keep the clock on, without the light coming from it. Once the device detects it's dark from the light sensor, it will auto set the backlight to red, and reduce the backlight brightness based on the darkness. You can also manually set the alarm time in the code. When the alarm goes off, the screen auto turns on, buzzing the buzzer, until you tap the clock to turn it off.

All of the code and parts list for this project is available on my GitHub, linked at the top of this page.

You can easily modify the code to add more features, such as weather information, or even a calendar linked to your account!

Images

Image 1 of 5: Connecting Screen
Connecting Screen

Connecting Screen

What I Learned

I learned a lot more about working with Arduino; digital vs analog pins, and how to connect everything together. In the end everything worked out perfectly, and now I use this everyday to quickly glance at the time, without having to look elsewhere.

Once you finish building the clock, you can set it up once, and then leave it in your room, and it will always show you the current time, and sunset & sunrise times!