ntpTest
The ntpTest sketch does a test of the library's SNTP (Simple Network Time Protocol) client:- Initialization
- SSID Scan
- Access Point connection
- DHCP address assignment
- SNTP time synchronization
- Extract and print current time and date
The client also breaks out the synchronized network time into a structure containing current date and time fields. The sketch formats and prints this information to the Serial Monitor.
#define WLAN_SSID "yourNetwork" // cannot be longer than 32 characters! #define WLAN_PASS "yourPassword"
// Security can be WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2 #define WLAN_SECURITY WLAN_SEC_WPA2
Hello, CC3000! Free RAM: 843 Initialising the CC3000 ... Firmware V. : 1.19 Deleting old connection profiles Attempting to connect to fios63 Started AP/SSID scan Connecting to fios63...Waiting to connect...Connected! Request DHCP UpdateNTPTime Current local time is: 7:18:52.65445 Thursday, September 12, 2013 Day of year: 255 Closing the connection