NRF24L01+ not sending any data

Hello,
i'm currently trying to get 2 NRFL2401+ to work with 2 Arduino Micros and the RF24 Library, but it seems harder than i expected. :frowning:

The problem isn't the cabling or the general hardware. At least i think so...

Actually i'm just trying to send an int from one Micro to the other one and display this on the serial monitor. An extensive Google search didn't help and the german forum doesn't seem to know an answer.

Here's my code for the transmitter:

// RF24 Bibliothek einbinden

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

// Pipe erstellen (LL = LongLong)

const uint64_t pipe = 0xE8E8F0F0E1LL;

// Radio erzeugen

RF24 radio( 9, 10 );

// int zum uebertragen

int test;

void setup() {

  test = 1;

  Serial.begin( 9600 );
  radio.begin();

  radio.openWritingPipe( pipe );
  
}

void loop() {

  if ( radio.available() ) {

    radio.write( &test, sizeof( test ) );
    Serial.println( test );
  
    delay( 1000 );
    
  } else {

    Serial.println( "Radio not available" );
    
  }
  
}

And for the receiver:

// Bibliothek einbinden

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

// Pipe erzeugen (LL = LongLong)

const uint64_t pipe = 0xE8E8F0F0E1LL;

// Radio erzeugen

RF24 radio( 9, 10 );

int test;

void setup() {

  Serial.begin( 9600 );

  radio.begin();
  radio.openReadingPipe( 1, pipe );
  radio.startListening();
  
}

void loop() {

  if ( radio.available() ) {

    radio.read( &test, 10 );
    Serial.println( test );
    
  } else {

    Serial.println( "Radio not available" );
    
  }
  
}

Thanks for every hint :slight_smile:

What happens when you run that code?

if ( radio.available() ) {

checks for the reception of a packet, not the availability of the device.

radio.read( &test, 10 );

overwrites memory.

And the output?

I bet both serial monitors get flooded with "Radio not available".

Many people have found this tutorial helpful.

Try: Capacitor between Vcc and GND

PaulS:
What happens when you run that code?

The serial monitor of the transmitter shows nothing, not even "Radio not available". When I delete "radio.write( &test, sizeof( test ) );" it gets flooded with 1.
The serial monitor of the receiver shows nothing.

jremington:
Many people have found this tutorial helpful.

hanyc93:
Try: Capacitor between Vcc and GND

I'll give it a try, thanks!

Hey .I am trying to send some data from one arduino mega 2560 to another mage 2560 using nrf24L01 . I am following joystick example on this Link:
http://arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo
But this is not working.
I am following Pin configuration attached below from this link :NRF24: NRF24 library for Arduino
It gives output Radio not available
Can anyone me Plz???

Capture.PNG