Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
daryl2110
Date:
Mon Feb 20 07:38:40 2012 +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 fa4993a8ccac main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Feb 20 07:38:40 2012 +0000
@@ -0,0 +1,33 @@
+//Programming for XBEE at Ngee Ann Polytechnic Electrical Engineering Final Year Project Part1(Bus1)//
+
+#include "mbed.h"
+
+Serial xbee1(p9, p10);
+
+DigitalOut rst1(p11);
+
+DigitalOut myled(LED1);
+DigitalOut myled1(LED2);
+
+int main() {
+    char bus;
+    
+
+    rst1   = 0;
+    myled  = 0;
+    myled1 = 0;
+    wait_ms(1);
+    rst1   = 1;
+    wait_ms(1);
+
+    while (1) {
+        if (xbee1.writeable()) {
+            printf("xbee is writeable\n");
+            xbee1.printf("r"); 
+            wait(0.1);
+            printf("r is written\n");
+           // bus = xbee1.getc();
+           // printf("%c\n", bus);
+        }
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r fa4993a8ccac mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Feb 20 07:38:40 2012 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/7110ebee3484