I'm trying to get two nRF24L01+PA+LNA's communicating and radio.available() is coming back false. I've scoured the internet and found Robin2's demo post. The nRF's are connected to adapter boards with on nRF and a Mega powered via 12V battery and the other nRF and a Nano powered by a 12V wall adapter. The transmit side (Nano) has a 10 µF capacitor across the 3.3V-G. Both sides are reading around 3.3V across those pins.
Pinouts are as follows: Mega: CE 7, CSN 8, SCK 52, MO 51, MI 50. Robin2's ConnectionCheck.ino looks good (no 0x00 or 0xff). Nano: CE 7, CSN 8, SCK 11, MO 12, MI 13. ConnectionCheck also looks good there. I had one nRF that didn't have a good ConnectionCheck that has been trashed.
Here's my transmit code:
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(7, 8); // CE, CSN
const byte address[5] = {'R','x','A','A','A'};
void setup() {
Serial.begin(9600);
radio.begin();
radio.setPALevel(RF24_PA_LOW);
radio.setDataRate( RF24_250KBPS );
radio.openWritingPipe(address);
radio.stopListening();
}
void loop() {
const char text[] = "Hello World";
radio.write(&text, sizeof(text));
Serial.println("Transmitted");
delay(1000);
}
And my receive code:
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(7, 8); // CE, CSN
const byte address[5] = {'R','x','A','A','A'};
void setup() {
Serial.begin(9600);
radio.begin();
radio.setPALevel(RF24_PA_MIN);
radio.setDataRate( RF24_250KBPS );
radio.openReadingPipe(1, address);
radio.startListening();
}
void loop() {
if (radio.available()) {
char text[32] = "";
radio.read(&text, sizeof(text));
Serial.println(text);
Serial.println("available");
} else{
Serial.println("not available");
}
delay(1000);
}
The transmit side steadily prints transmitted and the receiver side prints not available. Any thoughts? Thanks!