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 WiflyInterface mbed
Revision 1:8b6ea44e02bb, committed 2012-08-24
- Comitter:
- samux
- Date:
- Fri Aug 24 15:27:22 2012 +0000
- Parent:
- 0:42b732f6238c
- Commit message:
- fixed typo
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 42b732f6238c -r 8b6ea44e02bb main.cpp
--- a/main.cpp Fri Aug 24 15:26:15 2012 +0000
+++ b/main.cpp Fri Aug 24 15:27:22 2012 +0000
@@ -1,39 +1,39 @@
-#include "mbed.h"
-#include "WiflyInterface.h"
-#include "NTPClient.h"
-
-/* wifly interface:
-* - p9 and p10 are for the serial communication
-* - p19 is for the reset pin
-* - p26 is for the connection status
-* - "mbed" is the ssid of the network
-* - "password" is the password
-* - WPA is the security
-*/
-WiflyInterface wifly(p28, p27, p25, p26, "mbed", "password", WPA);
-NTPClient ntp;
-
-int main()
-{
- wifly.init(); //Use DHCP
-
- wifly.connect();
-
- printf("Trying to update time...\r\n");
- if (ntp.setTime("0.pool.ntp.org") == 0)
- {
- printf("Set time successfully\r\n");
- time_t ctTime;
- ctTime = time(NULL);
- printf("Time is set to (UTC): %s\r\n", ctime(&ctTime));
- }
- else
- {
- printf("Error\r\n");
- }
-
- wifly.disconnect();
-
- while(1) {
- }
+#include "mbed.h"
+#include "WiflyInterface.h"
+#include "NTPClient.h"
+
+/* wifly interface:
+* - p9 and p10 are for the serial communication
+* - p19 is for the reset pin
+* - p26 is for the connection status
+* - "mbed" is the ssid of the network
+* - "password" is the password
+* - WPA is the security
+*/
+WiflyInterface wifly(p9, p10, p19, p26, "mbed", "password", WPA);
+NTPClient ntp;
+
+int main()
+{
+ wifly.init(); //Use DHCP
+
+ wifly.connect();
+
+ printf("Trying to update time...\r\n");
+ if (ntp.setTime("0.pool.ntp.org") == 0)
+ {
+ printf("Set time successfully\r\n");
+ time_t ctTime;
+ ctTime = time(NULL);
+ printf("Time is set to (UTC): %s\r\n", ctime(&ctTime));
+ }
+ else
+ {
+ printf("Error\r\n");
+ }
+
+ wifly.disconnect();
+
+ while(1) {
+ }
}
\ No newline at end of file