Dependencies:   EthernetInterface mbed-rtos mbed

Files at this revision

API Documentation at this revision

Comitter:
mgreenway
Date:
Mon Sep 10 09:20:31 2012 +0000
Parent:
0:ef12d2dfc744
Commit message:

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r ef12d2dfc744 -r d6b120a4f745 main.cpp
--- a/main.cpp	Mon Sep 10 08:45:04 2012 +0000
+++ b/main.cpp	Mon Sep 10 09:20:31 2012 +0000
@@ -5,7 +5,8 @@
     EthernetInterface eth;
     eth.init(); //Use DHCP
     eth.connect();
-    printf("IP Address is %s\n", eth.getIPAddress());
+    Serial pc(USBTX, USBRX); // tx, rx
+    pc.printf("IP Address is %s\n", eth.getIPAddress());
     
     TCPSocketConnection sock;
     sock.connect("mbed.org", 80);
@@ -20,7 +21,7 @@
         if (ret <= 0)
             break;
         buffer[ret] = '\0';
-        printf("Received %d chars from server:\n%s\n", ret, buffer);
+        pc.printf("Received %d chars from server:\n%s\n", ret, buffer);
     }
       
     sock.close();