RFM12B Example

Dependencies:   RFM12B TextLCD mbed-rtos mbed

/media/uploads/hajesusrodrigues/img_3299.jpg

mBed RFM12B module Hello World example

The main purpose of this example was to implement the RFM12B module in order to be able to establish communication with the Moteino (arduino clone that uses the RFM12B).

In this example I’m able to test the communication between:

1) mBed -> mBed (2 RFM12B modules sharing the same mBed board)

2) mBed -> Moteino

3) Moteino -> mBed

Who/What is Moteino? (http://lowpowerlab.com/moteino/)

Revision:
1:e30050868e55
Parent:
0:9457949d5d00
Child:
4:03f3bdc02069
diff -r 9457949d5d00 -r e30050868e55 main.cpp
--- a/main.cpp	Thu May 30 22:10:28 2013 +0000
+++ b/main.cpp	Thu May 30 22:11:56 2013 +0000
@@ -37,7 +37,8 @@
 
 #define TEST_TYPE MBED_TO_MBED
 
-void ReceiverThread(void const *args) {
+void ReceiverThread(void const *args)
+{
     Timer receiverTimer;
     rfm12b_receiver.Initialize(SERVER_MBED_NODE, RF12_433MHZ, NETWORD_ID); //id = 10, band 433, group 5
     rfm12b_receiver.SetEncryptionKey((uint8_t*) KEY);
@@ -84,7 +85,8 @@
     }
 }
 
-void SenderThread(void const *args) {
+void SenderThread(void const *args)
+{
     Timer ackTimer;
     Timer senderTimer;
 
@@ -149,7 +151,8 @@
     }
 }
 
-int main() {
+int main()
+{
 
 #if TEST_TYPE == MBED_TO_MBED
 
@@ -181,7 +184,7 @@
         activity_ledOn = 0;
         activity_ledOff = 1;
         wait(0.2);
-        
+
         if(pc.readable()) {
             if (pc.getc() == 'r') {
                 mbed_reset();