Fork of the Simple Ping-Pong demo application between two SX1272MB2xAs demo board. It's now a simple application demonstrating simple Rx (Receive) from a SX1272 boards.

Dependencies:   SX1272Lib mbed

Fork of SX1272PingPong by Semtech

Revision:
20:17d8ea079085
Parent:
19:538e05373d0f
Child:
21:03a7d7429cd1
--- a/main.cpp	Mon Mar 13 16:01:06 2017 +0000
+++ b/main.cpp	Tue Mar 28 14:44:05 2017 +0000
@@ -29,7 +29,7 @@
 #define LORA_CRC_ENABLED                            true
 
 #define RX_TIMEOUT_VALUE                            3500000   // in us
-#define BUFFER_SIZE                                 1024        // Define the payload size here
+#define BUFFER_SIZE                                 1024      // Define the payload size here
 
 DigitalOut led(LED1);
 
@@ -87,10 +87,15 @@
     Radio.Rx( RX_TIMEOUT_VALUE );
 
     while( 1 ) {
-        debug("\r\n========\r\nNew Packet\r\n========\r\n");
-        debug("%s \r\n", Buffer);
+        if(strlen(Buffer > 0)) {
+            debug("\r\n========\r\nNew Packet\r\n========\r\n");
+            debug("%s \r\n", Buffer);
+        }
+        // Clear the buffer
+        Buffer[0] = 0;
+        
         led = 1-led;
-        wait(3);
+        wait(1);
     }
 }