The LED matrix module is really versatile for use with microcontrollers and this project introduces a very simple digital clock using a single 8x8 LED matrix and an Arduino to show the time, date and temperature in degrees Celsius and Fahrenheit.
The matrix module is controlled by MAX7219 and the data of time and temperature are provided by a DS3231 RTC (Real Time Clock) module.
In this case, the DS3231 is more interesting to use because it has an internal temperature sensor and it is more accurate for time reading.
- Arduino UNO R3
- 8x8 LED matrix module with MAX7219
- RTC DS3231 module
Due to the size of LED matrix (8x8) only a number with two digits can be shown at same time.
The numbers are in 5x3 (rows x columns) and the first two rows at the top of matrix are used to represent the labels of all features.
Each feature is shown during a second before go ahead to the next.
At first row are:
- Time: Hour (H) / Minute (M) / Second (S)
- Date: Day (D) / Month (M) / Year (Y)
- Temperature: Celsius (ºC) / Fahrenheit (ºF)
At second row are:
- Weekdays: Mo / Tu / We / Th / Fr / Sa / Su
Note: The weekday is shown only when the date is viewed.
- RTC Time Setup:
If is the first time you are using the RTC module, you can adjust the time using the following statements I have included in the code marked as comments:
//setTime(20, 49, 00, 18, 02, 2019); // Set the Time and Date //RTC.set(now()); // Set the RTC time
Remove the comments marks "//" at begining of those statements; set the values of time and date; compile the code again.
After these steps, rewrite the comments marks "//" on the same two statements, recompile the code and resend it to Arduino.