NRF24L01 not receiving data

I am beginner and have just started to use nrf24l01. Here the problem is transmitter sends the data but receiver does not read the that though radio.available() returns true. Receiver print only blank in serial monitor and continues to next line. Please help me to figure it out and tell me the solution.

Transmitter code:-

#include<SPI.h>
#include<nRF24L01.h>
#include<RF24.h>

RF24 radio (7,8);
int check = 1;
const byte address[6] = "23269"; 

void setup() {
 
 radio.begin();
 radio.openWritingPipe(address);
 radio.setDataRate(RF24_250KBPS);   
radio.setPALevel(RF24_PA_LOW);
 radio.stopListening();
 }

void loop() {

  const char text[] = "Hello World";
  radio.write(&text,sizeof(text));
  delay(1000);
  

}

Receiver code:-

#include<SPI.h>
#include<nRF24L01.h>
#include<RF24.h>

RF24 radio (7,8);

const byte address[6] = "23269"; 

void setup() {
 Serial.begin(9600);
 radio.begin();
 radio.openReadingPipe(0,address);
 radio.setDataRate(RF24_250KBPS);   
 radio.setPALevel(RF24_PA_MAX);
 radio.startListening();
 }

void loop() {
  
if(radio.available()){
  
  char text[32] = "";

  radio.read(&text,sizeof(text));
  String call = String(text);

  
  Serial.println(call);
  delay(2000);
  
}


  

}

That can be a lot of reasons. I will take a SWAG and say you are powering the radios with the Arduino. This is not a good practice and at best only works marginally generally with kludges. Use a separate power supply and be sure the transmitter and receiver are at least a meter/yard apart. If my assumption is not correct then post an annotated schematic showing exactly how you have wired it. Be sure to include all power and ground connections.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.