Transmitter code for quadcopter

Dependencies:   mbed

Revision:
0:1b2cbe8cabf1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Nov 22 23:20:34 2011 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+#include "RF12B.h"
+#include <queue>
+
+Serial pc(USBTX, USBRX);
+RF12B radiolink(p5, p6, p7, p8, p9);
+
+//This program just listens to pc serial and sends a "sizeofpacket" prefixed packet over rf
+//for now, it is as blocking as it gets..
+int main() {
+    while (1) {
+        queue<char> qtobesent;
+        char packet_length = pc.getc();
+        for (int i = 0; i < packet_length; i++) {
+            qtobesent.push(pc.getc());
+        }
+        
+        radiolink.write(qtobesent);
+    }
+}