RF24 transmit/receive Basics

Evening everyone, I'm playing around with using RF24's to transmit and receive basic text and commands. I used a HowToMechatronics Youtube video and still I am having issues.

Running verification on both the Transmitting and receiving code has no issues and running the code doesn't have any problems either.

However, when I access my receiving codes serial monitor I continue to get a blank monitor instead of the intended text of "Hello World". If I click TimeStamp in serial monitor it shows that it's running the loop, it's just not seeing the text I send.

This is the transmitter code

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

RF24 radio(7, 8); // CE, CSN
const byte address[6] = "00001";

void setup() {
  // put your setup code here, to run once:
  radio.begin();
  radio.openWritingPipe(address);
  radio.setPALevel(RF24_PA_MIN);
  radio.stopListening();
}

void loop() {
  // put your main code here, to run repeatedly:
  const char text[] = "Hello World";
  radio.write(&text, sizeof(text));
  delay(1000);
}

This is the receiver code


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

RF24 radio(7, 8); // CE, CSN

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);
  }
}

I have 2 Unos with rf24 radio modules attached. I upload your code to them and in the receive serial monitor I get:

Hello World
Hello World
Hello World
Hello World
Hello World
Hello World

So the code is not the problem.
Check your wiring. Post a schematic of your wiring. Post a clear photo of your wiring.

How are the radios powered? The number one problem is insufficient current to the radios.

Are they the modules with the external antennas?

I suggest that you read Robin2's simple rf24 tutorial. It helped me to get my radios to work. In the tutorial Robin2 discusses the problem with power and some remedies. I use homemade versions of the rf24 adapters with great success. The tutorial also has a sketch to check the physical wired connection between the rf24 module and its processor. See reply #30.

@johannej1138, your topic has been moved to a more suitable location on the forum.

Introductory Tutorials is for tutorials that are written to help users, not for questions. Feel free to write one once you have mastered your problem :wink: