Hello World with a wifly module (RN 131 C/G - RN-XV)
Dependencies: mbed WiflyInterface
Revision 5:867d16e948eb, committed 2012-08-24
- Comitter:
- samux
- Date:
- Fri Aug 24 13:52:40 2012 +0000
- Parent:
- 4:fd030db1a6f4
- Commit message:
- use mbed_official WiflyInterface
Changed in this revision
WiflyInterface.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r fd030db1a6f4 -r 867d16e948eb WiflyInterface.lib --- a/WiflyInterface.lib Fri Aug 17 11:31:32 2012 +0000 +++ b/WiflyInterface.lib Fri Aug 24 13:52:40 2012 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/samux/code/WiflyInterface/#6ffb0aeb3972 +http://mbed.org/users/mbed_official/code/WiflyInterface/#fb4494783863
diff -r fd030db1a6f4 -r 867d16e948eb main.cpp --- a/main.cpp Fri Aug 17 11:31:32 2012 +0000 +++ b/main.cpp Fri Aug 24 13:52:40 2012 +0000 @@ -9,12 +9,13 @@ * - p26 is for the connection status * - "mbed" is the ssid of the network * - "password" is the password -* - true means that the security of the network is WPA +* - WPA is the security */ -WiflyInterface wifly(p9, p10, p25, p26, "mbed", "password", true); +WiflyInterface wifly(p9, p10, p25, p26, "mbed", "password", WPA); int main() { wifly.init(); // use DHCP while (!wifly.connect()); // join the network printf("IP Address is %s\n\r", wifly.getIPAddress()); + wifly.disconnect(); } \ No newline at end of file