pre commentaire

Dependencies:   EthernetInterface WebSocketClient mbed-rtos mbed

Fork of Code_APP3_C by Éric Bisson

Revision:
10:565271e4d52a
Parent:
9:400cfcf4b06e
Child:
11:f0ceb634d85c
--- a/main.cpp	Tue Feb 14 04:08:58 2017 +0000
+++ b/main.cpp	Tue Feb 14 17:34:31 2017 +0000
@@ -13,8 +13,9 @@
 int main() {
     
     // Setup du port ethernet
-    EthernetInterface eth;
-    eth.init(mbedIp, mbedMask, mbedGateway);
+    EthernetInterface eth;      
+    eth.init(); //Use DHCP
+    //eth.init(mbedIp, mbedMask, mbedGateway); //Use config
     eth.connect();
     
     DigitalOut RESET(p8);
@@ -38,7 +39,7 @@
     
     Websocket ws(WEBSOCKET_URL);
     ws.connect();
-    wait(1);
+    //wait(1);
     
     while(1)
     {
@@ -102,11 +103,6 @@
                 }
 #endif
                 ws.send(DATA_TO_READ._ptr);
-                wait_ms(5);
-                char* result;
-                ws.read(result);
-                
-                pc.printf(result);
                 
                 delete DATA_TO_READ._ptr;
             }