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: WebSocketClient WiflyInterface mbed
Fork of Websocket_Wifly_HelloWorld by
Revision 3:5c16d0d73e81, committed 2014-09-12
- Comitter:
- MACRUM
- Date:
- Fri Sep 12 02:09:55 2014 +0000
- Parent:
- 2:c69a06fe81c0
- Commit message:
- Initial release
Changed in this revision
--- a/WebSocketClient.lib Fri Aug 24 14:06:31 2012 +0000 +++ b/WebSocketClient.lib Fri Sep 12 02:09:55 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/samux/code/WebSocketClient/#466f90b7849a +http://mbed.org/users/samux/code/WebSocketClient/#4567996414a5
--- a/WiflyInterface.lib Fri Aug 24 14:06:31 2012 +0000 +++ b/WiflyInterface.lib Fri Sep 12 02:09:55 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/WiflyInterface/#fb4494783863 +http://mbed.org/teams/mbed/code/WiflyInterface/#a27cf731e79a
--- a/main.cpp Fri Aug 24 14:06:31 2012 +0000
+++ b/main.cpp Fri Sep 12 02:09:55 2014 +0000
@@ -4,24 +4,32 @@
/* 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
+* - p9 (TX) and p10 (RX) are for the serial communication
+* - p30 is for the reset pin
+* - p29 is for the connection status
+* - "ssid" is the ssid of the network
* - "password" is the password
* - WPA is the security
*/
-WiflyInterface wifly(p9, p10, p19, p26, "mbed", "password", WPA);
+#if TARGET_LPC1768
+WiflyInterface wifly(p9, p10, p30, p29, "ssid", "password", WPA);
+#else
+WiflyInterface wifly(D1, D0, D3, D2, "ssid", "pasword", WPA);
+#endif
+
+DigitalOut led(LED1);
int main() {
+ printf("Wifly WebSocket test\n");
wifly.init(); //Use DHCP
while (!wifly.connect());
- printf("IP Address is %s\n\r", wifly.getIPAddress());
+ printf("IP Address is %s\n", wifly.getIPAddress());
- Websocket ws("ws://sockets.mbed.org:443/ws/demo/wo");
+ Websocket ws("ws://sockets.mbed.org/ws/443/wo");
while (!ws.connect());
while (1) {
+ led = !led;
ws.send("WebSocket Hello World over Wifly");
wait(1.0);
}
--- a/mbed.bld Fri Aug 24 14:06:31 2012 +0000 +++ b/mbed.bld Fri Sep 12 02:09:55 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/10b9abbe79a6 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/9327015d4013 \ No newline at end of file
