Hello, i try to send some data from one arduino to another.
But it doesnt work.
my configuration is,
vcc = 3,3V
gnd = gnd
ce = Pin 7
csn = Pin 8
sck = Pin 52
mosi = Pin 51
miso = Pin 50
IRQ = isnt connected
Here is my "send sketch"
#include <nRF24L01.h>
#include <RF24.h>
#include <SPI.h>
RF24 radio(53,8); // CNS, CE
const byte adress[6] = "00001";
void setup() {
Serial.begin(9600);
radio.begin();
radio.openWritingPipe(adress);
radio.setPALevel(RF24_PA_MIN);
radio.stopListening();
}
void loop() {
const char text[] = "Es hat geklappt";
radio.startWrite(&text,sizeof(text),false);
radio.write(&text,sizeof(text));
delay(1000);
}
and here is my receive sketch
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(53,8); //CE, CSN
const byte adress[6] = "00001";
void setup() {
Serial.begin(9600);
radio.begin();
radio.openReadingPipe(0,adress);
radio.setPALevel(RF24_PA_MIN);
radio.startListening();
}
void loop() {
char text[32] = {0};
if(radio.available())
{
radio.read(&text,sizeof(text));
Serial.print(" ");
Serial.println(text);
}
else
{
Serial.print("Fehler");
}
}
the wiring is identical on each arduino
thanks for help!