Hello, I have:
- 2 × Arduino Uno
- 2 × NRF24L01 modules (with antennas)
- 2 × NRF24-specific adapters (for voltage regulation)
Wiring Setup:
VCC = 5V (using adapters, so VCC is at 5V)
CE → Pin 9
CSN → Pin 10
SCK → Pin 13
MOSI → Pin 11
MISO → Pin 12
(I connected both modules to the Arduinos identically.)
Code Used:
- Receiver Code:
#include <nRF24L01.h>
#include <RF24.h>
#define CE_PIN 9
#define CSN_PIN 10
RF24 radio(CE_PIN, CSN_PIN);
const byte rxAddr[6] = "00002";
void setup() {
Serial.begin(9600);
while(!Serial);
Serial.println("NRF24L01P Receiver Starting...");
if (radio.begin()){
Serial.println("nRF24L01 is started");
} else {
Serial.println("nRF24L01 is not started ");
while (1);
}
radio.setPALevel(RF24_PA_LOW);
radio.setDataRate(RF24_250KBPS);
radio.openReadingPipe(0, rxAddr);
radio.startListening();
}
void loop() {
if (radio.available()) {
char text[100] = {0};
radio.read(&text, sizeof(text));
Serial.println("Received Message: ");
Serial.print(text);
Serial.println("");
} else {
Serial.println("radio is not available!");
}
}
- Transmitter Code:
#include <nRF24L01.h>
#include <RF24.h>
#define CE_PIN 9
#define CSN_PIN 10
RF24 radio(CE_PIN, CSN_PIN);
const byte address[6] = "00002";
void setup() {
Serial.begin(9600);
if (radio.begin()) {
Serial.println("nRF24L01 is started ");
} else {
Serial.println("nRF24L01 is not started");
while (1);
}
radio.openWritingPipe(address);
radio.setPALevel(RF24_PA_HIGH);
radio.setDataRate(RF24_250KBPS);
radio.stopListening();
}
void loop() {
const char text[] = "Selamun aleykum benim adım nodeMCU , nrf24l01 ile bi veriyim.";
bool result = radio.write(&text, sizeof(text));
if (result) {
Serial.println("Mesaj gönderildi: " + String(text));
} else {
Serial.println("Mesaj gönderilemedi!");
}
delay(1000);
}
Problem:
The transmitter sends signals, but the receiver never gets them.
radio.available()always returnsfalse.- Tried:
- External power supply (3.3V regulator).
- Removing/repositioning antennas.
- Adding capacitors (10µF–100µF) between GND and VCC.
- Testing with different Arduinos.
- Total of 12 hours spent, no progress.
Additional Checks:
printDetails()shows no errors (SPI connections correct, addresses match).
PLEASE HELP! ![]()