This is a clock with its digits out of order.
Within the apparent chaos is a beautiful order!
Very simple use and intuitive reading, including an adjustable alarm for a buzzer or just a visual alert.
Using only three push buttons is possible to setup the time and alarm.
The internal clock of Arduino causes a delay of some seconds running during an hour, but RTC (Real Time Clock) is not used in this case because it is part of the fun to set the time on the clock by watching the changes in the sequence of digits.
Considering the playful purpose of this project, this is not an important issue.1. Components2. Setting of Time and Alarm
There are 3 buttons for the setup of time and alarm:
- Mode Button: navigation thru modes
(T)Time setting: Hour & Minute
(TA)Time Alarm setting: Hour & Minute
- Hour Button:
- Adjust the Hour in Modes (T) and (TA).
- Setup of Visual Alarm to On/Off in Mode (A).
- Minute Button:
- Adjust the Minute in Modes (T) and (TA).
- Setup of Sound Alarm to On/Off in Mode (A) only when the Alarm is On.3. Coding
In order for the clock to be readable, it is necessary to keep the default reading sequence from left to right, top to bottom.
To do this, the code's main logic divides the hour and minute into their tens and units to fetch them from the scrambled digit matrix.
By following this criterion, time reading becomes easier.
The LED matrix is divided into three main areas:
- Top Left: Used to display the digits (tens and units) of hours.
- Top Right: Used to display the digits (tens and units) of minutes.
- Bottom: Used to display the digits (tens and units) of seconds.
Note: As a personal preference, I have removed "zeros of tens" from numbers less than 10 for readability.