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: mbed Servo X_NUCLEO_IDW01M1v2 NetworkSocketAPI X_NUCLEO_IKS01A1 HC_SR04_Ultrasonic_Library
Diff: main.cpp
- Revision:
- 9:13bd9c989e6c
- Parent:
- 8:74b827befe72
- Child:
- 10:cc61a766cd1f
--- a/main.cpp Thu Jan 05 09:39:03 2017 +0000 +++ b/main.cpp Tue Jan 10 09:20:31 2017 +0000 @@ -144,8 +144,10 @@ int t=0; scanf("%d",&t); printf ("entered time is: %d \n\r", t); - if (t != 0) { time_t txTm = t; set_time(txTm); } - printf ("The current system time is: %s", ctime (&ctTime)); + if (t != 0) { time_t txTm = t; set_time(txTm); } // set Nucleo system time + ctTime = time(NULL); + printf ("The current system time is: %s", ctime (&ctTime)); // set WiFi module systm time + if (!spwf.set_time(ctTime)) printf ("ERROR set_time\n\r"); if (!spwf.clean_TLS_certificate(ALL)) printf ("ERROR clean_TLS_certificate\n\r"); if (!spwf.set_TLS_certificate(CA_cert, sizeof(CA_cert), FLASH_CA_ROOT_CERT)) printf ("ERROR set_TLS_certificate\n\r"); if (!spwf.set_TLS_SRV_domain("www.amazon.it",FLASH_DOMAIN)) printf ("ERROR set_TLS_CA_domain\n\r");