sample.png (122872Bytes)
receiver_code.PNG (12971Bytes)
transmitter_code.PNG (11631Bytes)
(Bytes)
nrf-ardino-en.png (84568Bytes)
Duemilanove-nrf_1.jpg (178082Bytes)
Duemilanove-nrf_2.jpg (191376Bytes)
DUE-nrf_1.jpg (171709Bytes)
DUE-nrf_2.jpg (163708Bytes)
output.png (122003Bytes)
Hello guys I'm trying to send message from arduino due to arduino duemilanove atmega328 using nRF24L01
arduino due is the transmitter and the code is
#include <SPI.h> #include <nRF24L01.h> #include <RF24.h>RF24 radio(7, 8);
const byte rxAddr[6] = “00001”;
void setup()
{
radio.begin();
radio.setRetries(15, 15);
radio.openWritingPipe(rxAddr);
radio.stopListening();
}void loop()
{
const char text[] = “Hello World”;
radio.write(&text, sizeof(text));
delay(1000);
}
arduino duemilanove atmega328 is receiver
- MOSI is connected to the digital pin 11
- MISO is connected to the digital pin 12
- SCK is connected to the digital pin 13
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>RF24 radio(7, 8);
const byte rxAddr[6] = “00001”;
void setup()
{
while (!Serial);
Serial.begin(9600);
radio.begin();
radio.openReadingPipe(0, rxAddr);
radio.startListening();
}void loop()
{
if (radio.available())
{
char text[32] = {0};
radio.read(&text, sizeof(text));
Serial.println(text);
}
}
when i run these code and open the serial monitor it is receiving some blank characters as the serial monitor is constantly scrolling.
I’ve also attached the screen shot of a test code
The NRF24l01 module is working fine with arduino duemilanove atmega328, the problem is with arduino DUE.
thanks you guys for reading