Test program for the Nordic Semi nRF24L01 Transceiver Module (http://www.sparkfun.com/products/691), talking to another module connected to SparkFun\'s Nordic Serial Interface Board (http://www.sparkfun.com/products/9019).

Dependencies:   mbed nRF24L01P

Revision:
8:fd4596275224
Parent:
7:8099b996329b
Child:
9:4dd1a0f48d68
--- a/main.cpp	Wed Dec 19 11:50:03 2018 +0000
+++ b/main.cpp	Wed Dec 19 11:52:35 2018 +0000
@@ -4,7 +4,8 @@
 Serial pc(USBTX, USBRX); // tx, rx
 
 nRF24L01P my_nrf24l01p(D11, D12, D13, D8, D9, D7);
-bool receiver = true;
+
+bool receiver = false;
 
 #define TRANSFER_SIZE   2
 
@@ -44,9 +45,9 @@
     char txData[TRANSFER_SIZE];
     int txDataCnt = 0;
     
-    pc.printf("--- SETTINGS: ---");
+    pc.printf("--- SETTINGS: ---\n\r");
     printSettings();
-    pc.printf("-----------------");
+    pc.printf("-----------------\n\r");
     
     for (int i = 0; i < 1000; i++) {
         txData[txDataCnt++] = i % 100;
@@ -56,7 +57,7 @@
             txDataCnt = 0;
         }
     }
-    pc.printf("Finished run!");
+    pc.printf("Finished run!\n\r\n\r");
 }
 
 int syncSettings(int frequency, int outputPower, int dataRate, bool art) {
@@ -110,7 +111,7 @@
     else { // Transmit mode
        pc.printf(">> Sending Modus << \n\r");
        // Frequency test
-       pc.printf("FREQUENCY TEST");
+       pc.printf("FREQUENCY TEST \n\r");
        senderTest(2400, NRF24L01P_TX_PWR_ZERO_DB, NRF24L01P_DATARATE_2_MBPS, false);
       // senderTest(2463, NRF24L01P_TX_PWR_ZERO_DB, NRF24L01P_DATARATE_2_MBPS, false);
 //       senderTest(2525, NRF24L01P_TX_PWR_ZERO_DB, NRF24L01P_DATARATE_2_MBPS, false);