File tree 1 file changed +8
-2
lines changed
libraries/RTC/examples/RTC_NTPSync
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
1
/* *
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
3
3
* to the current date and time retrieved from an NTP server on the Internet (pool.ntp.org).
4
4
* Then the current time from the RTC is printed to the Serial port.
5
5
*
6
6
* Instructions:
7
7
* 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 .
9
9
* 3. Open the Serial Monitor.
10
10
*
11
11
* Initial author: Sebastian Romero @sebromero
12
12
*/
13
13
14
14
#include " RTC.h"
15
+
16
+ #if defined(ARDUINO_PORTENTA_C33)
15
17
#include < WiFiC3.h>
18
+ #elif defined(ARDUINO_UNOWIFIR4)
19
+ #include < WiFiS3.h>
20
+ #endif
21
+
16
22
#include < WiFiUdp.h>
17
23
#include " arduino_secrets.h"
18
24
You can’t perform that action at this time.
0 commit comments