DFRobot DS1307 Руководство - Страница 4

Просмотреть онлайн или скачать pdf Руководство для Блок управления DFRobot DS1307. DFRobot DS1307 6 страниц. Real time clock module

DFRobot DS1307 Руководство
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