DS3231 Real Time Clock
The DS3231 real time clock module is an IC that displays the day of the week, date & time. The module uses the i2c interface to communicate to the microcontroller, which makes the connection very simple to follow.
Figure 1: DS3231 Module
Schematic
The schematic below shows how the module is connected to the Arduino Nano. Since the OLED Display also uses the i2c pins as well, the DS3231 Module and the OLED Display are the slave devices, while the Arduino Nano is the master device, which means that the SDA & SCL pins (on the RTC Module & OLED Display) are connected to each other.
Figure 2: The Schematic
How the Code Works
The schematic below shows how the module is connected to the Arduino Nano. Since the OLED Display also uses the i2c pins as well, the DS3231 Module and the OLED Display are the slave devices, while the Arduino Nano is the master device, which means that the SDA & SCL pins (on the RTC Module & OLED Display) are connected to each other.