DFRobot DS1307 Handbuch - Seite 5

Blättern Sie online oder laden Sie pdf Handbuch für Kontrolleinheit DFRobot DS1307 herunter. DFRobot DS1307 6 Seiten. Real time clock module

DFRobot DS1307 Handbuch
while (Serial.available() > 0)
{
comdata += char(Serial.read());
delay(2);
mark = 1;
}
//if data is all collected,then parse it
if (mark == 1)
{
Serial.println(comdata);
Serial.println(comdata.length());
//parse data
for (int i = 0; i < comdata.length() ; i++)
{
//if the byte is ',' jump it,and parse next value
if (comdata[i] == ',')
{
j++;
}
else
{
rr[j] = rr[j] * 10 + (comdata[i] - '0');
}
}
comdata = String("");
RTC.stop();
RTC.set(DS1307_SEC, rr[6]);
RTC.set(DS1307_MIN, rr[5]);
RTC.set(DS1307_HR, rr[4]);
RTC.set(DS1307_DOW, rr[3]);
RTC.set(DS1307_DATE, rr[2]);
RTC.set(DS1307_MTH, rr[1]);
RTC.set(DS1307_YR, rr[0]);
RTC.start();
Arrow.com.
Arrow.com.
Arrow.com.
Arrow.com.
Arrow.com.
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from