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: WIFI_API_32kRAM WebSocketClient mbed
Revision 1:610f3dc5679e, committed 2015-10-27
- Comitter:
- wgd8700
- Date:
- Tue Oct 27 10:03:33 2015 +0000
- Parent:
- 0:47ec083185d0
- Commit message:
- Add ws.read function
Changed in this revision
| WIFI_API_32kRAM.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 |
--- a/WIFI_API_32kRAM.lib Wed Oct 07 05:16:10 2015 +0000 +++ b/WIFI_API_32kRAM.lib Tue Oct 27 10:03:33 2015 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/teams/Delta/code/WIFI_API_32kRAM/#8d8c2064be73 +http://developer.mbed.org/teams/Delta/code/WIFI_API_32kRAM/#d4e992043905
--- a/main.cpp Wed Oct 07 05:16:10 2015 +0000
+++ b/main.cpp Tue Oct 27 10:03:33 2015 +0000
@@ -8,7 +8,7 @@
Serial pc(USBTX, USBRX);
int main() {
- char recv[30];
+ char recv[50];
pc.baud(115200);
pc.printf("Init...\n");
@@ -17,17 +17,20 @@
eth.init(); //Use DHCP
// set given SSID and PW as the highest priority
- wifi.setNetwork("Tsungta_iPhone", "icq87001", 0);
+ //wifi.setNetwork("Tsungta_iPhone", "icq87001", 0);
+ wifi.setNetwork("GainSpan_JS", "Delta9999", 0);
eth.connect(40000);
pc.printf("IP Address:%s\n",eth.getIPAddress());
pc.printf("MAC Address:%s\n",eth.getMACAddress());
- Websocket ws("ws://172.20.10.11:8888/ws");
+ Websocket ws("ws://192.168.15.105:8888/ws");
ws.connect();
while (1) {
ws.send("WebSocket Hello World over Ethernet");
- wait(1.0);
+ ws.read(recv);
+ pc.printf("read: %s\n", recv);
+ wait(1.0);
}
}
\ No newline at end of file