
Final
Dependencies: DebounceIn NokiaLCD WiflyInterface mbed
Fork of Websocket_Wifly_HelloWorld by
Revision 1:31e50fea8be8, committed 2012-08-23
- Comitter:
- samux
- Date:
- Thu Aug 23 14:09:06 2012 +0000
- Parent:
- 0:64c683256184
- Child:
- 2:c69a06fe81c0
- Commit message:
- update with the last wiflyInterface/websocket library
Changed in this revision
--- a/WebSocketClient.lib Fri Aug 17 12:01:03 2012 +0000 +++ b/WebSocketClient.lib Thu Aug 23 14:09:06 2012 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/samux/code/WebSocketClient/#9589afa4712e +http://mbed.org/users/samux/code/WebSocketClient/#466f90b7849a
--- a/WiflyInterface.lib Fri Aug 17 12:01:03 2012 +0000 +++ b/WiflyInterface.lib Thu Aug 23 14:09:06 2012 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/samux/code/WiflyInterface/#6ffb0aeb3972 +http://mbed.org/users/samux/code/WiflyInterface/#9a3cd07ed7e8
--- a/main.cpp Fri Aug 17 12:01:03 2012 +0000 +++ b/main.cpp Thu Aug 23 14:09:06 2012 +0000 @@ -1,28 +1,28 @@ -#include "mbed.h" -#include "WiflyInterface.h" -#include "Websocket.h" - - -/* wifly interface: -* - p9 and p10 are for the serial communication -* - p25 is for the reset pin -* - 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 -*/ -WiflyInterface wifly(p9, p10, p25, p26, "mbed", "password", true); - -int main() { - wifly.init(); //Use DHCP - while (!wifly.connect()); - printf("IP Address is %s\n\r", wifly.getIPAddress()); - - Websocket ws("ws://sockets.mbed.org:443/ws/demo/wo"); - while (!ws.connect()); - - while (1) { - ws.send("WebSocket Hello World over Wifly"); - wait(1.0); - } +#include "mbed.h" +#include "WiflyInterface.h" +#include "Websocket.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); + +int main() { + wifly.init(); //Use DHCP + while (!wifly.connect()); + printf("IP Address is %s\n\r", wifly.getIPAddress()); + + Websocket ws("ws://sockets.mbed.org:443/ws/demo/wo"); + while (!ws.connect()); + + while (1) { + ws.send("WebSocket Hello World over Wifly"); + wait(1.0); + } } \ No newline at end of file