nRF24L01 sends info but does not receive

Hello, I'm trying to learn wireless communication on Arduino. I chose nRF24L01. I have tried several guides and each time it is the same, i.e. the transmitter's serial monitor sends that it has sent and the receiver's serial monitor has not receive anything.

Below I am sending how I connected the module.
GND arduino
VCC 3.3V Arduino
CE 9
CS 10
MOSI 11
MISO 12
SCK 13

Transmitter code:

#include <SPI.h> //SPI support library
#include <nRF24L01.h> //library to support a given module
#include <RF24.h> //base library for the RF2 module family

const uint64_t pipe = 0x3A5CD94F26LL;
RF24 radio(9, 10); // assign CE and CS pins to the module

int a;

void setup() {
Serial.begin(9600);
radio.begin(); //run the module
radio.setChannel(76);
radio.openWritingPipe(pipe); //set the module to upload mode
a=1;
}

void loop() {
a=a+1;
radio.write(a, sizeof(int));
Serial.println(a);
delay(1000);

Receiver code

#include <SPI.h> //SPI support library
#include <nRF24L01.h> //library to support a given module
#include <RF24.h> //base library for the RF2 module family

const uint64_t pipe = 0x3A5CD94F26LL;
RF24 radio(9, 10); //assign CE and CS pins to the module

int a;

void setup() {
Serial.begin(9600);
radio.begin(); //run the module
radio.openReadingPipe(1,pipe); //set the module to receive mode
radio.startListening(); //start listening (receiving) data
a=0;
}

void loop() {
if ( radio.available() ) //checks whether there is data to receive,
   {                                           //if so:
      
       radio.read(a,sizeof(int)); //receive data and save to a variable of length
       Serial.println(a);
       delay(100);
   }


}

I tried with only the CE and CS pins connected and with all of them, I noticed that when I connect the miso pin to the receiver, it stops displaying further information on the serial monitor.

Welcome to the forum

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the < CODE/ > icon above the compose window) to make it easier to read and copy for examination

https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum

As to your problem :
Start by trying the sample sketches and advice in Simple nRF24L01+ 2.4GHz transceiver demo

Many NRF24 problems turn out to be related to the inadequate power being supplied to them. How are yours powered ?

Thanks for your answer, I edited my post as you said. I am going to read whole article tomorrow. Now I just connected as in tutorial and loaded code. Transmitter sends "Data Sent Message 0 Tx failed" in serial monitor.

If you used Robin's Tx and Rx code then your problem is almost certainly due to inadequate power

If you carefully follow all instructions in Robin2's simple rf24 tutorial and still do not have success, load and run the CheckConnection.ino sketch in post #30 for each radio module. That will test the physical connection between the modules and the connected Arduino.

How are the radio modules powered?

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