You are right and I am stupid. I should have seen that. I have now connected the 5V.
I already swapped the pins for CE and CSN when I saw Robin's tutorial.
I achieved partial success. Now my message is sometimes transmitted. The message is now transmitted very irregularly. Normally it should arrive every 2 seconds, but sometimes it takes 10 seconds or less or more.
Thank you in advance for your answers. You helped me a lot. I've tried so much and it was just because of the great tension. It's very depressing.
Do you have an idea how I can make the transmission constant every 2 seconds?
Thank you all for your help.
transceiver:
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(9,10);
const byte address[6] = "00001";
void setup(){
radio.begin();
radio.openWritingPipe(address);
radio.stopListening();
}
void loop(){
const char text[] = "Hello World";
radio.write(&text, sizeof(text))
delay(2000);
}
receiver:
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(9,10);
const byte address[6] = "00001";
void setup(){
Serial.begin(9600);
radio.begin();
radio.openReadingPipe(0, address);
radio.startListening();
}
void loop(){
if (radio.available()) {
char receivedText[32] = "";
radio.read(&receivedText, sizeof(receivedText));
Serial.print("Message was received: ");
Serial.println(receivedText);
}
}