How to send more than 28 bytes through nrf24l01

I too have same problem in getting data …from transmitter to receiver

Im using RF24 and RFNetwork library for sending data from large number of nodes to single master

I fragmented my 84 bytes array into 3 different 28 bytes array and sending it to master… but my master code can only read first 28 bytes…

HERE IS MY MASTER CODE:

#include <RF24Network.h>
#include <RF24.h>
#include <SPI.h>

RF24 radio(9, 8);
RF24Network network(radio);

const uint16_t Master_node = 00;
const uint16_t Slave_1_node = 01;

char incomingData[31];

unsigned long last_time = 0;
void setup() {
Serial.begin(9600);
SPI.begin();
radio.begin();
network.begin(90, Master_node);
radio.setDataRate(RF24_250KBPS);
Serial.println(“LOOP STARTED”);

}
void loop() {

// delay(2000);
RF24NetworkHeader header1;
network.update();
// delay(50);
network.read(header1, &incomingData, sizeof(incomingData));
Serial.println(incomingData);

}

HERE IS MY SLAVE CODE:

#include <RF24Network.h>
#include <RF24.h>
#include <SPI.h>

RF24 radio(9, 8);
RF24Network network(radio);

const uint16_t Master_node = 00;
const uint16_t Slave_1_node = 01;

char incomingData[6];
String Received_cmd = “”;
byte status_flag = 1;

char received_data[83];
uint8_t index = 0;
unsigned long last_time = 0;
char array1[31];
char array2[31];
char array3[31];

void getDatafromMega() {

digitalWrite(5, HIGH);
if (Serial.available() > 0)
{
char c = Serial.read();
if (c == ‘*’)
{
index = 0;
uint8_t i = 0;
for (i = 0; i < 84; i++)
{
received_data = ‘\0’;

  • }*
  • }*
  • else if (c == ‘#’)*
  • {*
    memcpy(array1, received_data, 14 * sizeof(int));
    memcpy(array2, received_data + 28 , 15 * sizeof(int));
    memcpy(array3, received_data + 58 , 13 * sizeof(int));
  • status_flag = 0;*
  • }*
  • else*
  • {*
  • received_data[index] = c;*
  • index++;*
  • }*
  • }*
  • digitalWrite(5, 0);*
    }
    void setup() {
  • Serial.begin(9600);*
  • pinMode(5, OUTPUT);*
  • radio.begin();*
  • network.begin(90, Slave_1_node);*
  • radio.setDataRate(RF24_250KBPS);*
  • radio.enableDynamicPayloads();*
  • Serial.println(“begin loop”);*
    }
    void loop() {
  • if (status_flag == 0) {*
  • RF24NetworkHeader header1(Master_node);*
  • network.write(header1, &array1, sizeof(array1));*
  • delay(100);*
  • network.write(header1, &array2, sizeof(array2));*
  • delay(100);*
  • network.write(header1, &array3, sizeof(array3));*
  • delay(100);*
  • status_flag = 1;*
  • }*
  • else if (status_flag == 1) {*
  • for (int i = 0; i < 6; i++) {*
    _ incomingData = ‘\0’;_
    * }*
    * getDatafromMega();*
    * }*
    }

@hanishgopi, yours is a new question in a 6-years dead Thread so I have suggested to the Moderator to move it to its own Thread.

You have not said how far apart your Arduinos are - maybe the Network library is not necessary?

And to make it easy for people to help you please modify your post and use the code button </>
codeButton.png

so your code 
looks like this

and is easy to copy to a text editor. See How to use the Forum

...R
Simple nRF24L01+ Tutorial

@hanishgopi

TOPIC SPLIT.
Please don't HIJACK other posts and maybe READ THIS please.

Bob.