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

Dependencies:   Radio mbed

Revision:
0:114850b470f5
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);
+    }
+}