Skip to content

Commit 727c39d

Browse files
author
JChristensen
committed
Add call to getEUI64 to SetSerial example.
1 parent bb7c31a commit 727c39d

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

examples/SetSerial/SetSerial.ino

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void setup(void)
4343
{
4444
byte rtcID[8];
4545

46-
Serial.begin(115200);
46+
Serial.begin(57600);
4747

4848
//setSyncProvider() causes the Time library to synchronize with the
4949
//external RTC by calling RTC.get() every five minutes by default.
@@ -59,6 +59,15 @@ void setup(void)
5959
Serial << _HEX(rtcID[i]);
6060
}
6161
Serial << endl;
62+
63+
RTC.getEUI64(rtcID);
64+
Serial << F("EUI-64 = ");
65+
for (int i=0; i<8; ++i) {
66+
if (rtcID[i] < 16) Serial << '0';
67+
Serial << _HEX(rtcID[i]);
68+
}
69+
Serial << endl;
70+
6271
Serial << F("Calibration Register = ") << RTC.calibRead() << endl;
6372
}
6473

@@ -158,4 +167,4 @@ void printI00(int val, char delim)
158167
Serial << _DEC(val);
159168
if (delim > 0) Serial << delim;
160169
return;
161-
}
170+
}

0 commit comments

Comments
 (0)