Controller Code of Mbed for Follow My Eye Project

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
pramodnataraja
Date:
Wed Dec 14 04:42:37 2011 +0000
Commit message:
Version 1

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Dec 14 04:42:37 2011 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+
+Serial xbee1(p9, p10);
+DigitalOut rst1(p11);
+DigitalOut led1(LED1);
+Serial pc(USBTX, USBRX);
+
+int main() {
+    rst1 = 0;   //Set reset pin to 0    
+    wait(.5);
+    rst1 = 1;   //Set reset pin to 1
+    wait(.5);
+    led1 = 1;
+
+    while (1) {
+   if(pc.readable())
+   {
+        xbee1.putc(pc.getc());  //XBee write data received from COM serial port
+        led1 = !led1;
+    }
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Dec 14 04:42:37 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912