File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
libraries/RTC/examples/RTC_NTPSync Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 11/* *
2- * This example shows how to set the RTC (Real Time Clock) on the Portenta C33
2+ * This example shows how to set the RTC (Real Time Clock) on the Portenta C33 / UNO R4 WiFi
33 * to the current date and time retrieved from an NTP server on the Internet (pool.ntp.org).
44 * Then the current time from the RTC is printed to the Serial port.
55 *
66 * Instructions:
77 * 1. Change the WiFi credentials in the arduino_secrets.h file to match your WiFi network.
8- * 2. Upload this sketch to Portenta C33.
8+ * 2. Upload this sketch to Portenta C33 / UNO R4 WiFi .
99 * 3. Open the Serial Monitor.
1010 *
1111 * Initial author: Sebastian Romero @sebromero
1212 */
1313
1414#include " RTC.h"
15+
16+ #if defined(ARDUINO_PORTENTA_C33)
1517#include < WiFiC3.h>
18+ #elif defined(ARDUINO_UNOWIFIR4)
19+ #include < WiFiS3.h>
20+ #endif
21+
1622#include < WiFiUdp.h>
1723#include " arduino_secrets.h"
1824
You can’t perform that action at this time.
0 commit comments