Hi guys, I facing with problem using radio data xchange. My setup is:
- Nano (clone) as the sender and
- nodeMCU V2 as the receiver
Both are using same version of RF24 and are set up the same:
RF24 radio(CE_PIN, CSN_PIN);
const byte address[] = {'R','x','A','A','A'};
radio.begin();
radio.setChannel(12);
radio.setCRCLength(RF24_CRC_16);
radio.setDataRate(RF24_250KBPS);
radio.setPALevel(RF24_PA_LOW);
radio.openWritingPipe(address); // openReadingPipe(1, address) at the receiver
radio.stopListening(); // radio.startListening(); at the receiver
radio.printPrettyDetails();
but the printed default values are already different:
// sender side:
SPI Frequency = 10 Mhz
Channel = **255** (~ 2655 MHz)
Model = nRF24L01+
RF Data Rate = 1 MBPS
RF Power Amplifier = **PA_MAX**
RF Low Noise Amplifier = Disabled
CRC Length = **16 bits**
Address Length = 2 bytes
Static Payload Length = 32 bytes
Auto Retry Delay = 250 microseconds
Auto Retry Attempts = 0 maximum
Packets lost on
current channel = 7
Retry attempts made for
last transmission = 15
Multicast = Allowed
Custom ACK Payload = Enabled
Dynamic Payloads = Disabled
Auto Acknowledgment = Disabled
Primary Mode = RX
TX address = 0x0000000000
pipe 0 (closed) bound = 0x0000000000
pipe 1 (closed) bound = 0x0000000000
pipe 2 (closed) bound = 0x00
pipe 3 (closed) bound = 0xff
pipe 4 (closed) bound = 0x00
pipe 5 (closed) bound = 0x00
Tempsensors:1
Transmitted Data was : tmp = 21.06
and
SPI Frequency = 10 Mhz
Channel = 0 (~ 2400 MHz)
Model = nRF24L01+
RF Data Rate = 1 MBPS
RF Power Amplifier = PA_MIN
RF Low Noise Amplifier = Disabled
CRC Length = Disabled
Address Length = 2 bytes
Static Payload Length = 32 bytes
Auto Retry Delay = 250 microseconds
Auto Retry Attempts = 0 maximum
Packets lost on
current channel = 0
Retry attempts made for
last transmission = 0
Multicast = Disabled
Custom ACK Payload = Disabled
Dynamic Payloads = Disabled
Auto Acknowledgment = Disabled
Primary Mode = TX
TX address = 0x0000000000
pipe 0 (closed) bound = 0x0000000000
pipe 1 (closed) bound = 0x0000000000
pipe 2 (closed) bound = 0x00
pipe 3 (closed) bound = 0x00
pipe 4 (closed) bound = 0x00
pipe 5 (closed) bound = 0x00
Received Data is : tmp = 0.00
Even though I set the same channels and other values, they were different when running. Of course, the sent data is not received either. And even I check wether data is available the loop is printing millions of line with zero value:
void loop() {
static uint32_t lastReception;
uint32_t topLoop = millis();
if (radio.available()) {
radio.read(&dataToRead, sizeof(dataToRead));
dataToRead.display(F("Received Data is : "));
lastReception = topLoop;
}
if (topLoop - lastReception >= 10000) {
Serial.println(F("no reception for ten seconds"));
lastReception = topLoop;
}
}
Help me please what should I change?