Problem with getting nRF24L01 modules to work

Hi!
I have some trouble with getting nRF24L01 modules (version with external antenna and PA) to work. The transmitter is hooked up to the Arduino Nano and the receiver is connected to Arduino Mega.
Code for transmitter:

/*
* Arduino Wireless Communication Tutorial
*     Example 1 - Transmitter Code
*                
* by Dejan Nedelkovski, www.HowToMechatronics.com
* 
* Library: TMRh20/RF24, https://github.com/tmrh20/RF24/
*/
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(7, 8); // CNS, CE
const byte address[6] = "00001";
void setup() {
  radio.begin();
  radio.openWritingPipe(address);
  radio.setPALevel(RF24_PA_MIN);
  radio.stopListening();
}
void loop() {
  const char text[] = "Hello World";
  radio.write(&text, sizeof(text));
  delay(1000);
}

Code for receiver:

/*
* Arduino Wireless Communication Tutorial
*       Example 1 - Receiver Code
*                
* by Dejan Nedelkovski, www.HowToMechatronics.com
* 
* Library: TMRh20/RF24, https://github.com/tmrh20/RF24/
*/
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(7, 8); // CNS, CE
const byte address[6] = "00001";
void setup() {
  Serial.begin(9600);
  radio.begin();
  radio.openReadingPipe(0, address);
  radio.setPALevel(RF24_PA_MIN);
  radio.startListening();
}
void loop() {
  if (radio.available()) {
    char text[32] = "";
    radio.read(&text, sizeof(text));
    Serial.println(text);
  } else {
    Serial.println("unavailable.");
  }
}

When I try to run this, the receiver outputs “unavailable”. Can someone please tell me what can be wrong?
There are decoupling caps installed on the 3V3 lines of the arduino, so I don’t think that is the problem.

Have a look at this Simple nRF24L01+ Tutorial. I have kept the examples as simple as possible and they do work. If you have problems it will be easier to help with an example I am familiar with.

The high-power nRF24 needs an external 3.3v power supply - the Arduino 3.3v pin cannot provide enough current.

I believe you can have problems with the high-power versions if the Tx and Rx are too close to each other because the signal power is too high.

...R

I changed the code to the one from your tutorial, used external power supply and it still does not wanna work. The only change that I made was that I've chosen pins 7 and 8 instead of 9 and 10 in the receiver. When I look at the transmitter serial port I see: SimpleTx Starting Data Sent Message 0 Tx failed

I don't think the problem is with the power, cause I can use radio.setPALevel(RF24_PA_MIN); and it still does not change anything.

Are you using 2 high-power nRF24s?

How far apart is the Tx and Rx?

Have you any other nRF24s that you can substitute to check if one of them is faulty?

After you upload the code make sure to power off the Arduino and on again to make sure that the nRF24 resets.

If you are not using pin 10 then make sure that it is set pinMode(10, OUTPUT) so the Arduino behaves as an SPI master.

Better still - use my code and wiring EXACTLY as I posted it until you get the communication working.

Post some examples of the output from both Arduinos.

Re check your wiring AGAIN and AGAIN

Stick with the same simple program until you get things working.

...R