16
Crowduino UNO-SD/Arduino UNO x1
Crowtail – Base Shield x1
Crowtail – RTC x1
Crowtail – Cable x1
USB Cable x1
Required Parts
Open the downloaded folder “Crowtail-
Advanced kit for Arduino demo code”,
navigate to the folder lib-> RTC, and add
RTC to the Arduino library. Open the
P7_Get_Current_Time
with Arduino IDE and
upload it.
STEP2:
Connect Crowtail-RTC to Crowtail-Base
shield’s I port. The complete connection is as
follows:
STEP1:
Plug the Crowtail-Base Shield onto the Arduino or Crowduino Board.
Hardware Connection
Lesson 7 – Get current time
Introduction
This tiny RTC module is based on the clock chip DS1307
which communicates with microcontrollers with I2C
protocol. The clock/calendar provides seconds, minutes,
hours, day, date, month and year information. The end of
the month date is automatically adjusted for months with
fewer than 31 days, including corrections for leap year.
Besides, this module is really low power consumption, it
can serve you more than a month with a CR1220 battery.
If you want to make your own electronic watch, you need
to generate the correct time, so in this lesson, let's take a
look at how to use RTC to get the time.
Open the serial monitor of the Arduino IDE and you will see that the monitor is printing out your local
time.
What will you see
1. Import I2C library and RTC standard library.
Code overview
Содержание Crowtail
Страница 48: ......