You are on page 1of 4

Arduino - DS3231 Real Time Clock

Step 1: Required Hardware

Arduino Board - https://goo.gl/Rqc5w2


DS3231 Real Time - https://goo.gl/oXbKri
CR2032 Coin Battery - https://goo.gl/oXbKri
LCD Display - https://goo.gl/oXbKri
Potentiometer - https://goo.gl/oXbKri
Breadboard - https://goo.gl/oXbKri
Jumper Wires - https://goo.gl/oXbKri - https://goo.gl/oXbKri
Recommended Site - https://goo.gl/HDkZBt

Step 2: About the DS3231 Module


The DS3231 is a low-cost, Real Time Clock Module which can maintain
hours, minutes and seconds, as well as, day, month and year
information.
The module can work on either 3.3 or 5V. The battery input is 3V and a
typical CR2032 3V battery can power the module and maintain the
information for more than a year.

Step 3: Connection
1. We will connect the DS3231 module
2. We will connect the LCD Display

Get the Source Code:

#include <DS3231.h>

#include <LiquidCrystal.h>

DS3231 rtc(SDA, SCL);

LiquidCrystal lcd(1, 2, 4, 5, 6, 7);

void setup() {

rtc.begin();

lcd.begin(16,2);

void loop() {
lcd.setCursor(0,0);

lcd.print("Time: ");

lcd.print(rtc.getTimeStr());

lcd.setCursor(0,1);

lcd.print("Date: ");

lcd.print(rtc.getDateStr());

delay(1000);

You might also like