Takes data over the serial connection and transmits it over a radio link using the nRF24L01+.

Dependencies:   Radio mbed

Files at this revision

API Documentation at this revision

Comitter:
pclary
Date:
Mon Sep 02 02:20:09 2013 +0000
Commit message:
Initial commit

Changed in this revision

Radio.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 114850b470f5 Radio.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Radio.lib	Mon Sep 02 02:20:09 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/pclary/code/Radio/#7953b5fa8aae
diff -r 000000000000 -r 114850b470f5 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Sep 02 02:20:09 2013 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+#include "Radio.h"
+
+
+
+RadioController radio(p5, p6, p7, p8, p9);
+
+
+
+int main()
+{
+    Serial pc(USBTX, USBRX);
+    pc.baud(460800);
+    
+    radio.reset();
+    
+    uint32_t data;
+    
+    while (true)
+    {
+        data = 0;
+        data |= ((uint32_t)pc.getc()) <<  0;
+        data |= ((uint32_t)pc.getc()) <<  8;
+        data |= ((uint32_t)pc.getc()) << 16;
+        data |= ((uint32_t)pc.getc()) << 24;
+        radio.transmit(data);
+    }
+}
diff -r 000000000000 -r 114850b470f5 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Sep 02 02:20:09 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/7e6c9f46b3bd
\ No newline at end of file