Test program for ESP8266

Dependencies:   MODSERIAL esp8266 mbed

Fork of esp8266test by Adhithya Rajasekaran

Revision:
0:a6e6cf82c329
Child:
1:87002f9b898d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri May 01 15:10:08 2015 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+#include "esp8266.h"
+#include "MODSERIAL.h"
+
+// Create a new MODSERIAL object with the pins used to interface
+// ESP8266. I used p13 and p14. You can change it to any other 
+// serial pins on the Mbed. 
+MODSERIAL wifi(p13,p14);
+
+DigitalOut myled(LED1);
+
+int main() {
+    ESP8266 e(&wifi,"Annai","cleverriver266"); // Pass in the address to the MODSERIAL interface
+    // and the SSID of the Wifi network you want to communicate with and its
+    // password. 
+    while(e.checkConnection() == false){
+      //   
+    }
+    
+    printf("ESP8266 is connected to the wireless network!\n");
+    
+}