wifi receive code

Dependencies:   TextLCD mbed

Revision:
0:644275e48645
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu May 02 10:23:05 2013 +0000
@@ -0,0 +1,31 @@
+#include "mbed.h"
+#include "TextLCD.h"
+ 
+Serial xbee1(p9, p10);
+DigitalOut rst1(p11);
+ 
+DigitalOut myled(LED1);
+DigitalOut myled2(LED2);
+ 
+TextLCD lcd(p15, p16, p17, p18, p19, p20);
+
+int main() {
+    rst1 = 0;   //Set reset pin to 0
+    myled = 0;
+    myled2= 0;
+    wait_ms(1);
+    rst1 = 1;   //Set reset pin to 1
+    wait_ms(1);
+ 
+    lcd.printf("starting\n");
+    wait(2);
+    lcd.cls();
+    
+     while (1) {
+ 
+        if(xbee1.readable()){
+         char  a = xbee1.getc();
+           lcd.printf("%d", a);
+                            }
+                }
+     }
\ No newline at end of file