Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: NTPClient NetworkSocketAPI X_NUCLEO_IDW01M1v2 mbed
Fork of NTPClient_HelloWorld by
Example of retrieval of current time using an NTP server.
Time is then used to perform a TLS secure connection to https://mbed.org.
The application is meant to be used with mbed OS 2 ("Classic") only (no mbedOS 5 support).
Diff: main.cpp
- Revision:
- 5:88cece84fb6e
- Parent:
- 4:11f2b556765b
- Child:
- 6:96e92bfda33e
diff -r 11f2b556765b -r 88cece84fb6e main.cpp
--- a/main.cpp Mon Jan 02 15:46:54 2017 +0000
+++ b/main.cpp Tue Jan 03 13:02:14 2017 +0000
@@ -41,7 +41,7 @@
ctTime = time(NULL);
printf ("\n\rConnecting to WiFi ...\n\r");
- spwf.connect("crespan","Elfrontal1", NSAPI_SECURITY_WPA2);
+ spwf.connect("ssid","passw", NSAPI_SECURITY_WPA2);
NTPClient ntp(spwf);
printf("Initial System Time is: %s\r\n", ctime(&ctTime));
