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