Sonar_Beacon

Dependencies:   mbed RF12B

Files at this revision

API Documentation at this revision

Comitter:
xiaxia686
Date:
Wed Mar 21 22:09:56 2012 +0000
Commit message:

Changed in this revision

RF12B.lib Show annotated file Show diff for this revision Revisions of this file
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 bc5045987df8 RF12B.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RF12B.lib	Wed Mar 21 22:09:56 2012 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/madcowswe/code/RF12B/#09e016eea608
diff -r 000000000000 -r bc5045987df8 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Mar 21 22:09:56 2012 +0000
@@ -0,0 +1,30 @@
+#include "mbed.h"
+#include "RF12B.h"
+//#include "SRF05.h"
+#define CODE 0x88
+
+DigitalOut Led_1(LED1);
+DigitalOut trigger(p13);
+
+Serial pc(USBTX, USBRX); // tx, rx
+
+RF12B RF_Beacon(p5,p6,p7,p8,p9);
+
+char data_in;
+
+int main() {
+    pc.printf("Beacon Side \n");
+    while (1) {
+        data_in=RF_Beacon.read();
+        if (data_in == (char) CODE) {
+            Led_1 = 1;
+            trigger = 1;
+            wait_us(10);
+            trigger = 0;
+            pc.printf("%x \n",data_in);
+            Led_1 = 0;
+
+        }
+
+    }
+}
diff -r 000000000000 -r bc5045987df8 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Mar 21 22:09:56 2012 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/14f4805c468c