sender backup

Dependencies:   mbed

Fork of XBee_write by Alex Louden

Revision:
0:74b4b9fc9480
Child:
1:bd05bf8bbe0a
diff -r 000000000000 -r 74b4b9fc9480 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Jun 04 10:23:46 2010 +0000
@@ -0,0 +1,26 @@
+#include "main.h"
+
+Serial xbee1(p9, p10);
+DigitalOut rst1(p11);
+
+DigitalOut myled(LED1);
+DigitalOut myled2(LED2);
+
+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);
+
+    while (1) {
+        int a = getKeyNum();
+        
+        if(a!=-1){
+            myled2 = 1;
+            xbee1.putc(a); //XBee write
+            myled2 = 0;
+        }
+    }
+}