Need help with rf24l01 modules [SOLVED]

so i have been trying to get this to work for the past few weeks but nothing i do seems to work so i need your help.

this is the code im using for the transmitter:

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(7,8);
const byte address[6] = "00001";
void setup() {
radio.begin();
radio.openWritingPipe(address);
radio.setPALevel(RF24_PA_MIN);
radio.setDataRate(RF24_250KBPS);
pinMode(A0,INPUT);
pinMode(A2,INPUT);
pinMode(A3,INPUT);
Serial.begin(9600);
//bool result = radio.isChipConnected();
//Serial.println(result);
}
int speed = 0,Xaxis = 0,Yaxis = 0, sp = 0;
void loop() {
const char text[] = "nefe";
bool report = radio.write(&text, sizeof(text));
if(report){
Serial.println("sent");
}
bool result = radio.isChipConnected();
Serial.println(result);
delay(1000);
}

the serial monitor just types this out:

image

it's saying that the chip is connected but it won't send anything.

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 </> icon above the compose window) to make it easier to read and copy for examination

What do you expect it to print ?
How do you know that it doesn't send anything ?

Start with the examples in this topic which are known to work
Simple nRF24L01+ 2.4GHz transceiver demo

I expect it to print a combination of "0" and "sent".

My receiver didn't pick anything up, but it could also be an issue with the receiver. I'm pretty new to this stuff.

Try the examples that I linked to and report back

Exactly which RF modules do you have and are they connected directly to Arduinos or via a carrier board ?

Okay will try them.

The ones with the antenna no clue on the name.

The receiver is connected via breadboard and the transmitter is connected directly with jumper cables.

Those modules are notorious for not working due to the current that they require. Hence the use of carrier boards like these New NRF24L01 Wireless Transceiver Socket Adapter Board 8Pin 3.3v Regulator | eBay

You can help to a certain extent without such carriers by putting a large value capacitor across the power pins of the NRF24

Tried the example and it looks like everything is fine on the transmitters end. This is what it writes "Data Sent Message 3 Acknowledge received" (with the number going from 0-9), but the receiver just prints "Data received" with no number afterwards.

Already put a 10uF cap on both of them.

Does the receiver print this message at roughly 1 second intervals, or does it print it repeatedly very fast?

Repeatedly without delay.

I've seen this in the past. I think it was either that there was a wiring error on the receiver (so check your wiring again), or that the radio module settings got messed up. The radio module does not reset when you load new code into your Arduino. Try recycling the power to your RX Arduino & radio module.

my bad it was a connection error had the ce and csn pins set incorrectly feel really dumb. Looks like it works now thank you.

No problem. Glad it's working now.

No problem

Good luck going forward

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