I have tried so many times but Its not working at all.
Here are my codes and connections.
Nano connection:
CE 7
CSN 8
SCK 13
MOSI 11
MISO 12
Mega connection:
CE 8
CSN 53
SCK 52
MOSI 51
MISO 50
Transmitter:
#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.openWritingPipe(address);
radio.setDataRate(RF24_2MBPS); // Set the speed of the transmission to the quickest available
radio.setChannel(114); // Use a channel unlikely to be used by Wifi, Microwave ovens etc
radio.setPALevel(RF24_PA_MAX); // Set radio Tx power to MAX
radio.setRetries(15,15);
radio.stopListening();
}
void loop() {
const char text[] = "Hello World";
radio.write(&text, sizeof(text));
delay(1000);
}
Receiver:
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(8, 53); // CE, CSN
const byte address[6] = "00001";
void setup() {
Serial.begin(9600);
radio.begin();
radio.openReadingPipe(0, address);
radio.setDataRate(RF24_2MBPS); // Set the speed of the transmission to the quickest available
radio.setChannel(114); // Use a channel unlikely to be used by Wifi, Microwave ovens etc
radio.setPALevel(RF24_PA_MAX); // Set radio Tx power to MAX
radio.setRetries(15,15);
radio.startListening();
}
void loop() {
if (radio.available()) {
char text[32] = "";
radio.read(&text, sizeof(text));
Serial.println(text);
}
}
The connection for Transmitter:
The connection for Receiver:
Here is the Receiver Output:
Here is the mega connection check with nrf: