Example program for the SeeedStudio WiFi Shield V2.0, based on UART serial port connectivity (D0/D1 pins). This program connects to WiFi hotspot, obtains an IP using DHCP and downloads http://mbed.org/media/uploads/mbed_official/hello.txt

Dependencies:   WiflyInterface mbed

Revision:
8:f8bb043cf183
Parent:
7:5aef8fc8996d
Child:
11:e26d01206ed4
--- a/main.cpp	Fri Jul 25 12:26:16 2014 +0000
+++ b/main.cpp	Thu Aug 21 11:20:04 2014 +0000
@@ -43,16 +43,16 @@
     // If no param is passed to init() then DHCP will be used on connect()
     int s = eth.init();
     if (s != NULL) {
-        printf(">>> Could not initialise. Halting!\n");
+        printf(">>> Could not initialise. Halting!\r\n");
         exit(0);
     }
 
-    printf(">>> Get IP address...\n");
+    printf(">>> Get IP address...\r\n");
     while (1) {
         s = eth.connect(); // Connect to network
 
         if (s == false || s < 0) {
-            printf(">>> Could not connect to network. Retrying!\n");
+            printf(">>> Could not connect to network. Retrying!\r\n");
             wait(3);
         } else {
             break;
@@ -75,7 +75,7 @@
         if (ret <= 0)
             break;
         buffer[ret] = '\0';
-        printf(">>> Received %d chars from mbed.org:\n%s\n", ret, buffer);
+        printf(">>> Received %d chars from mbed.org:\r\n%s\r\n", ret, buffer);
     }
     sock.close();