Controller code

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
ikhorosh
Date:
Thu Oct 13 03:07:38 2011 +0000
Commit message:

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
diff -r 000000000000 -r b1f3cd059526 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Oct 13 03:07:38 2011 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+
+Serial xbee1(p9, p10);
+DigitalOut rst1(p11);
+DigitalOut led1(LED1);
+Serial pc(USBTX, USBRX);
+AnalogIn slider(p15);
+
+int main() {
+    rst1 = 0;   //Set reset pin to 0
+    
+    wait(.5);
+    rst1 = 1;   //Set reset pin to 1
+    
+    wait(.5);
+    led1 = 1;
+    pc.printf("starting trans");
+
+    char y = 0;
+
+    while (1) {
+        wait(1);
+        y+=10;
+        xbee1.putc(slider*100);  //XBee write
+        pc.printf("%d", y); 
+        led1 = !led1;
+           }
+}
diff -r 000000000000 -r b1f3cd059526 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Oct 13 03:07:38 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912