NTP example
Dependencies: NTPClient WiflyInterface mbed
Diff: main.cpp
- Revision:
- 2:a2c9e5deaf47
- Parent:
- 1:8b6ea44e02bb
--- a/main.cpp Fri Aug 24 15:27:22 2012 +0000 +++ b/main.cpp Thu Jul 12 17:27:04 2018 +0000 @@ -10,14 +10,16 @@ * - "password" is the password * - WPA is the security */ -WiflyInterface wifly(p9, p10, p19, p26, "mbed", "password", WPA); + +WiflyInterface wifly(p9, p10, p30, p29, "new_frontiers", "asd", NONE); NTPClient ntp; int main() { wifly.init(); //Use DHCP - wifly.connect(); + while (!wifly.connect()); // join the network + printf("IP Address is %s\n\r", wifly.getIPAddress()); printf("Trying to update time...\r\n"); if (ntp.setTime("0.pool.ntp.org") == 0)