This is my Transmitter side. here i want to send some alpha numeric data to my receiver side through nRF24L01. but the receiver is getting only the 1st two data. plz any body help me.
//TXT
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(7, 8);
const byte rxAddr[6] = "00001";
void setup() {
Serial.begin (9600);
radio.begin ();
radio.setRetries (15, 15);
radio.openWritingPipe (rxAddr);
radio.setPayloadSize(32);
radio.stopListening();
}
void loop()
{
const char data[] = " 0.0000000e+00, -2.0000000e+03, 7.0000000e+04, 5.2500000e+04, 0.0000000e+00, 7.4902610e-07, -2.2500123e-03, -1.9999939e+03, 6.9999924e+04, 5.2500034e+04, 7.9086928e-03";
Serial.println(data);
radio.write(&data, sizeof(data));
delay(1000);
}
Receiver side
//RXT
#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.setPayloadSize(32);
radio.startListening();
}
void loop() {
{
if (radio.available())
{
char data[32] = {0};
radio.read(&data, sizeof(data));
Serial.println(data);
delay(1000);
}
}
}