Patrick Clary
/
PcRadioBridge
Takes data over the serial connection and transmits it over a radio link using the nRF24L01+.
Revision 0:114850b470f5, committed 2013-09-02
- Comitter:
- pclary
- Date:
- Mon Sep 02 02:20:09 2013 +0000
- Commit message:
- Initial commit
Changed in this revision
--- /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
--- /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); + } +}
--- /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