DFRobot DS1307 매뉴얼 - 페이지 4
{카테고리_이름} DFRobot DS1307에 대한 매뉴얼을 온라인으로 검색하거나 PDF를 다운로드하세요. DFRobot DS1307 6 페이지. Real time clock module
RTC.set(DS1307_DATE, 12);
RTC.set(DS1307_MTH, 2);
RTC.set(DS1307_YR, 12);
//start rtc time
RTC.start();
}
//RTC.SetOutput(LOW);
//RTC.SetOutput(HIGH);
//RTC.SetOutput(DS1307_SQW1HZ);
//RTC.SetOutput(DS1307_SQW4KHZ);
//RTC.SetOutput(DS1307_SQW8KHZ);
RTC.SetOutput(DS1307_SQW32KHZ);
}
void loop()
{
int i;
//get current time
RTC.get(rtc, true);
//print current time format : year month day week hour min sec
for (i = 0; i < 7; i++)
{
Serial.print(rtc[i]);
Serial.print(" ");
}
//blink the light
Serial.println();
digitalWrite(ledPin, HIGH);
delay(500);
digitalWrite(ledPin, LOW);
delay(500);
//
int j = 0;
//read all the data
Arrow.com.
Arrow.com.
Arrow.com.
Arrow.com.
Downloaded from
Downloaded from
Downloaded from
Downloaded from