Appreciate insight and comment.
Here is the core part of the code. It is Atmega2560 on Arduino 1.8.1 and RF24 library
Transmitter send 3 packets of 32 bytes each. Wait until 33ms time mark, repeat.
Receiver loop read data, process and reformat and dump out through serial port.
Both transmitter on vastly different rf channel and different radio_1.setRetries(11,2) and (2,2)
#include <SPI.h>
#include "RF24.h"
#include "printf.h"
#include <EEPROM.h>
Rf_data_buf_struct rf_data_buf;
RF24 radio_1(9,10);
RF24 radio_0(7,8); // Set up nRF24L01 radio on SPI bus plus pins 7ce & 8csn
const uint64_t pipes[4] = { 0xABCDABCD71LL, 0x544d52687CLL, 0x544d52688CLL, 0x544d52689CLL };
void setup(void) {
Serial.begin(230400);
printf_begin();
radio_0.begin(); // Setup and configure rf radio
radio_0.setChannel(read_ch0); //60);
radio_0.setPALevel(RF24_PA_MAX);
radio_0.setDataRate(RF24_250KBPS);
radio_0.setAutoAck(1); // Ensure autoACK is enabled
radio_0.setRetries(2,2); // Optionally, increase the delay between retries & # of retries
radio_0.setCRCLength(RF24_CRC_8); // Use 8-bit CRC for performance
radio_0.openWritingPipe(pipes[0]);
radio_0.openReadingPipe(1,pipes[1]);
radio_0.startListening(); // Start listening
radio_0.printDetails(); // Dump the configuration of the rf unit for debugging
radio_0.powerUp(); //Power up the radio
radio_1.begin(); // Setup and configure rf radio
radio_1.setChannel(read_ch1);
radio_1.setPALevel(RF24_PA_MAX);
radio_1.setDataRate(RF24_250KBPS);
radio_1.setAutoAck(1);
radio_1.setRetries(11,2); // Optionally, increase the delay between retries & # of retries
radio_1.setCRCLength(RF24_CRC_8); // Use 8-bit CRC for performance
radio_1.openWritingPipe(pipes[2]);
radio_1.openReadingPipe(1,pipes[3]);
radio_1.startListening(); // Start listening
radio_1.printDetails(); // Dump the configuration of the rf unit for debugging
radio_1.powerUp(); //Power up the radio
Serial.println(" Radio power up");
}
void dump_data0(){
Serial.print(rf_data0_0.w, 4);
Serial.println(F(" "));
//..... etc
}
void loop(void){
while (radio_0.available()){
radio_0.read( &rf_data_buf, sizeof(rf_data_buf)); //rf receive buffer
process_reformat();
dump_data0();
}
while (radio_1.available()){
radio_1.read( &rf_data_buf, sizeof(rf_data_buf)); //rf receive buffer
process_reformat();
dump_data1();
}
}