0% found this document useful (0 votes)
49 views4 pages

DS3231 Real Time Clock - Arduino: Step 1: Required Hardware

This document provides instructions for using an Arduino and DS3231 real-time clock module to display the current time and date on an LCD display. It lists the required hardware, describes the DS3231 real-time clock module and how it works, outlines the basic connection steps, and provides sample Arduino code to read the time and date from the DS3231 and display it on the LCD.

Uploaded by

Hassan Allawi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views4 pages

DS3231 Real Time Clock - Arduino: Step 1: Required Hardware

This document provides instructions for using an Arduino and DS3231 real-time clock module to display the current time and date on an LCD display. It lists the required hardware, describes the DS3231 real-time clock module and how it works, outlines the basic connection steps, and provides sample Arduino code to read the time and date from the DS3231 and display it on the LCD.

Uploaded by

Hassan Allawi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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