asd

Dependencies:   mbed

Revision:
0:3c2ab0fec740
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Feb 08 16:13:38 2016 +0000
@@ -0,0 +1,43 @@
+#include "mbed.h"
+#include "CoordCommands.h"
+
+DigitalOut reset(p8);
+Serial pc(USBTX,USBRX);
+Serial xbee(p13, p14);
+
+
+int main() {
+ 
+     
+    reset = 0;
+    wait(0.4);
+    reset = 1;
+
+    wait(1);
+    
+    while(xbee.readable())
+    {
+        char dompe = xbee.getc();  
+    }
+
+    //Temp
+    char panID[5];
+    panID[0] = 0xC0;
+    panID[1] = 0xFF;
+    panID[2] = 0xEE;
+    panID[3] = 0xBA;
+    panID[4] = 0xBE;
+    
+    CoordinatorCommands coord(&xbee, &pc, panID, 5);    
+    
+    while(1) {
+        if(pc.readable()) 
+        {
+            xbee.putc(pc.getc());
+        }
+        if(xbee.readable()) 
+        {
+            pc.putc(xbee.getc());
+        }
+    }
+}