NRF24l01 Arduino Writing fails

I am having trouble using the NRF24 moudule to send a message to Raspberry pi
i am using python in the Pi and its works fine.

The library used for the arduino is Tmrh20

This is my code

#include <SPI.h>
#include "RF24.h"
#include<printf.h>
short int a=123;

RF24 radio(7, 8);
//const uint64_t pipes[3] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0E2LL, 0xF0F0F0F0E3LL };

void setup(void) {
Serial.begin(9600);
printf_begin();
radio.begin();
radio.setPALevel(RF24_PA_MAX);
radio.openWritingPipe(0xF0F0F0F0E1LL);
radio.printDetails();
radio.stopListening();
}

void loop(void)
{
  const char text[]="Hello";
if(!radio.write(&text, sizeof(text) )){  //i assume you can check if the writing failed, using this method
  Serial.println("failed");
}
delay(5000);
}

and i always get “failed” at the serial monitor :frowning:

STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 = 0xf0f0f0f0e1 0xc2c2c2c2c2
RX_ADDR_P2-5 = 0xc3 0xc4 0xc5 0xc6
TX_ADDR = 0xf0f0f0f0e1
RX_PW_P0-6 = 0x20 0x00 0x00 0x00 0x00 0x00
EN_AA = 0x3f
EN_RXADDR = 0x03
RF_CH = 0x4c
RF_SETUP = 0x07
CONFIG = 0x0e
DYNPD/FEATURE = 0x00 0x00
Data Rate = 1MBPS
Model = nRF24L01+
CRC Length = 16 bits
PA Power = PA_MAX
failed
failed
failed
failed
failed

I am pretty sure that the wiring are okay…ive checked it multiple times.
any help guys

Have you a second Arduino that you could use for testing?

I don't have an RPi and all of my nRF24 work has been between Arduinos. This Simple nRF24L01+ Tutorial may be of interest. I have particularly tried to keep it simpler than the TMRh20 examples.

...R

Ive tried your code..but i can't get it to work..

This is what i get

Da Tx failed Data Sent Message 0 Tx failed Data Sent Message 0 Tx failed Data Sent Message 0 Tx failed Data Sent Message 0 Tx failed Data Sent Message 0 Tx failed SimpleTx Starting Data Sent Message 0 Tx failed Data Sent Message 0 Tx failed Data Sent Message 0 Tx failed Data Sent Message 0 Tx failed Data Sent Message 0 Tx failed Data Sent Message 0 Tx failed Data Sent Message 0 Tx failed Data Sent Message 0 Tx failed Data Sent Message 0 Tx failed

Ferico: Ive tried your code..but i can't get it to work..

You need to tell me more than that.

What Arduinos are you running the the pair of programs on?

Post the code that YOU have uploaded to your two Arduinos.

Make a simple pencil drawing showing how you have everthing connected and post a photo of the drawing?

Have you any spare nRF24s so you can check if one of them has failed?

Have you a 10µF capacitor across Vcc and GND for the nRF24s?

...R