Limited number of char over nrf24l01

UPDATE:- The problem has been resolved. Thank you for everyone who have helped me out.

Problem:-I am sending a very large string (nearly 120 char) over nrf24l01 module but at receiver side i am just getting limited number of char (i.e-32).

Note:-This is going to be in DAQ(Data Acquisition System) so I want to transmit it as fast as possible.

For Example data I send:-
0.1396484400,-0.0065917969,0.8986816400,-1,0,0,-11018,17621,18642,17463,-32543

And Data I receive:-
0.1396484400,-0.0065917969,0.898
(This data is limited to 32char)

Here is the transmitter code

#include <SPI.h>
//#include <SD.h>
#include <Wire.h>
#include <nRF24L01.h>
#include <RF24.h>
//#include "printf.h"
RF24 radio(6,7); // CE, C SN
const byte address[6] = "00001";
int fl2, fl1, fr2, fr1, rl2, rl1, rr2, rr1, st;
float fl, fr, rl, rr;
const int DamperSamplingDelay = 1;
const double conversion = 0.0488758553274682;
char gForceX_text[15];
char gForceY_text[15];
char gForceZ_text[15];

//char fl_text[15];
//char fr_text[15];
//char rl_text[15];
//char rr_text[15];
const int chipSelect = 4;
long accelX, accelY, accelZ;
float gForceX, gForceY, gForceZ;
//String dataString = "";
long gyroX, gyroY, gyroZ, OldTime, TimeDiff;
int rotX, rotY, rotZ;///////////////////////look Data Type
int counter=0;
void setupMPU() {
  Wire.beginTransmission(0b1101000); //This is the I2C address of the MPU (b1101000/b1101001 for AC0 low/high datasheet sec. 9.2)
  Wire.write(0x6B); //Accessing the register 6B - Power Management (Sec. 4.28)
  Wire.write(0b00000000); //Setting SLEEP register to 0. (Required; see Note on p. 9)
  Wire.endTransmission();
  Wire.beginTransmission(0b1101000); //I2C address of the MPU
  Wire.write(0x1B); //Accessing the register 1B - Gyroscope Configuration (Sec. 4.4)
  Wire.write(0x00000000); //Setting the gyro to full scale +/- 250deg./s
  Wire.endTransmission();
  Wire.beginTransmission(0b1101000); //I2C address of the MPU
  Wire.write(0x1C); //Accessing the register 1C - Acccelerometer Configuration (Sec. 4.5)
  Wire.write(0b00000000); //Setting the accel to +/- 2g
  Wire.endTransmission();
}
void radioInt() {
  radio.begin();
  radio.openWritingPipe(address);
  radio.setPALevel(RF24_PA_MIN);
  radio.stopListening();
  radio.setPayloadSize(500);
  //radio.setDataRate( RF24_250KBPS );
  radio.setRetries(3,5);
}
void setup() {
  Serial.begin(2000000);
  //printf_begin();
  Wire.begin();
  setupMPU();
  radioInt();
  //Serial.print("Initializing SD card...");
  /*if (!SD.begin(chipSelect)) {

    //Serial.println("Card failed, or not present");
    return;
    }*/

  //Serial.println("SD Card is present");
  //writeToSD("Controller Startup!");
  //writeToSD("Frequency, AccX, AccY, AccZ, GyrX, GyrY, GyrZ, Front Left Damper, Front Right Damper, Rear Left Damper, Rear Right Damper,Steering");
}
/*void writeToSD(String text) { //Writes Strings to SD card
  File dataFile = SD.open("gtms.csv", FILE_WRITE);
  if (dataFile) {
    dataFile.println(text);
    //Print to the //Serial port too:
    //Serial.println(text);
    dataFile.close();
  }
  else {
    //Serial.println("error opening gtms.csv");
  }
  }*/

void recordAccelRegisters() {
  Wire.beginTransmission(0b1101000); //I2C address of the MPU
  Wire.write(0x3B); //Starting register for Accel Readings
  Wire.endTransmission();
  Wire.requestFrom(0b1101000, 6); //Request Accel Registers (3B - 40)
  while (Wire.available() < 6);
  accelX = Wire.read() << 8 | Wire.read(); //Store first two bytes into accelX
  accelY = Wire.read() << 8 | Wire.read(); //Store middle two bytes into accelY
  accelZ = Wire.read() << 8 | Wire.read(); //Store last two bytes into accelZ
  processAccelData();
}

void processAccelData() {
  gForceX = accelX / 16384.0;
  gForceY = accelY / 16384.0;
  gForceZ = accelZ / 16384.0;
  //if(gprevgForceX

  dtostrf(gForceX, 10, 10, gForceX_text);
  dtostrf(gForceY, 10, 10, gForceY_text);
  dtostrf(gForceZ, 10, 10, gForceZ_text);




}

void recordGyroRegisters() {
  Wire.beginTransmission(0b1101000); //I2C address of the MPU
  Wire.write(0x43); //Starting register for Gyro Readings
  Wire.endTransmission();
  Wire.requestFrom(0b1101000, 6); //Request Gyro Registers (43 - 48)
  while (Wire.available() < 6);
  gyroX = Wire.read() << 8 | Wire.read(); //Store first two bytes into accelX
  gyroY = Wire.read() << 8 | Wire.read(); //Store middle two bytes into accelY
  gyroZ = Wire.read() << 8 | Wire.read(); //Store last two bytes into accelZ
  processGyroData();
}

void processGyroData() {
  rotX = gyroX / 131.0;
  rotY = gyroY / 131.0;
  rotZ = gyroZ / 131.0;
}

/*void printData() {
  Serial.print(" Gyro (deg)");
  Serial.print("X=");
  Serial.print(rotX);
  Serial.print(" Y=");
  Serial.print(rotY);
  Serial.print(" Z=");
  Serial.print(rotZ);
  Serial.print(" Accel (g)");
  Serial.print(" X=");
  Serial.print(gForceX);
  Serial.print(" Y=");
  Serial.print(gForceY);
  Serial.print(" Z=");
  Serial.println(gForceZ);
  }*/
void takeDamperReading() {
  fl1 = analogRead(A0);
  fr1 = analogRead(A1);
  rl1 = analogRead(A2);
  rr1 = analogRead(A3);
  delay(DamperSamplingDelay);
  fl2 = analogRead(A0);
  fr2 = analogRead(A1);
  rl2 = analogRead(A2);
  rr2 = analogRead(A3);
  fl = (((fl2 - fl1) * conversion) / DamperSamplingDelay) * 1000;
  fr = (((fr2 - fr1) * conversion) / DamperSamplingDelay) * 1000;
  rl = (((rl2 - rl1) * conversion) / DamperSamplingDelay) * 1000;
  rr = (((rr2 - rr1) * conversion) / DamperSamplingDelay) * 1000;
  /*dtostrf(fl, 4, 3, fl_text);
    dtostrf(fr, 4, 3, fr_text);
    dtostrf(rl, 4, 3, rl_text);
    dtostrf(rr, 4, 3, rr_text);*/
  st = analogRead(A6);

}
void loop() {


  // OldTime = micros();

  recordAccelRegisters();

  recordGyroRegisters();

  takeDamperReading();

  // printData();
  //dataString = String(TimeDiff) + ", " + String(gForceX) + ", " + String(gForceY) + ", " + String(gForceZ) + ", " + String(rotX) + ", " + String(rotY) + ", " + String(rotZ) + "," + String(fl) + "," + String(fr) + "," + String(rl) + "," + String(rr) + "," + String(st);

  char realTime[120];
  snprintf(realTime, 120, "%s,%s,%s,%d,%d,%d,%d,%d,%d,%d,%d", gForceX_text, gForceY_text, gForceZ_text, rotX, rotY, rotZ, fl, fr, rl, rr, st );
  String realTime_St = realTime;
  Serial.println(realTime);
  bool done;
  while (!done) {
    counter += 1;
    
    
    done=radio.write(realTime, sizeof(realTime));
    //Serial.println(realTime);

  }
  counter = 0;
  //Serial.println("\n");
//Serial.println("Okay");

  //Serial.println(dataString);



  //dataString = "";
  // TimeDiff = micros() - OldTime;
  //dataString = String(TimeDiff);
  // Serial.println(TimeDiff);
  //Serial.println("\n");*/
}

Here is the receiver side

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

RF24 radio(3,7); // CE, CSN
long y, x;
bool done;
char text[120];
const byte address[6] = "00001";
void setup() {
  Serial.begin(2000000);
  radioInt();
}
void radioInt(){
  radio.begin();
  radio.openReadingPipe(0, address);
  radio.setPALevel(RF24_PA_MIN);
  radio.startListening();
  //radio.setDataRate( RF24_250KBPS );
  radio.setRetries(3,5);
  radio.setPayloadSize(500);
}

void loop() {
  //x=micros();
  bool done = 0;
  while (!done) {
    if (radio.available()) {

      //text[0]= "";
       radio.read(&text, sizeof(text));
      Serial.println(text);

      //}
    } 
  }
  //if(!radio.available()){
  // Serial.println("Error");
  //}
  //y=micros()-x;
  // Serial.println(y);
  //y=micros()-x;

  //Serial.print("\t");
  //Serial.print("Delay");
  //Serial.println(y);
  //text[]={0};
}

An nRF24 can send a max of 32 bytes in one message. I have never tried sending more and I don't know if the library is designed so that it can break up a long message into several parts, nor if it can automatically re-assemble the parts when received.

My suggestion is that you modify your program so that it only sends a max of 32 bytes each time.

Separately ...

What is the purpose of converting a perfectly good cstring realTime into a not-so-good String realTime_St. It is not a good idea to use the String (capital S) class on an Arduino as it can cause memory corruption in the small memory on an Arduino. This can happen after the program has been running perfectly for some time.

Why are you bothering to convert all the numbers into a string when it would be much simpler to send them directly - especially if you store the values in an array or a struct?

...R

Robin2:
What is the purpose of converting a perfectly good cstring realTime into a not-so-good String realTime_St. It is not a good idea to use the String (capital S) class on an Arduino as it can cause memory corruption in the small memory on an Arduino. This can happen after the program has been running perfectly for some time.

Done Converted all String to string data type.

#include <SPI.h>
//#include <SD.h>
#include <Wire.h>
#include <nRF24L01.h>
#include <RF24.h>
//#include "printf.h"
RF24 radio(6,7); // CE, C SN
const byte address[6] = "00001";
int fl2, fl1, fr2, fr1, rl2, rl1, rr2, rr1, st;
float fl, fr, rl, rr;
const int DamperSamplingDelay = 1;
const double conversion = 0.0488758553274682;
char gForceX_text[5];
char gForceY_text[5];
char gForceZ_text[5];

//char fl_text[15];
//char fr_text[15];
//char rl_text[15];
//char rr_text[15];
const int chipSelect = 4;
long accelX, accelY, accelZ;
float gForceX, gForceY, gForceZ;
//string dataString = "";
long gyroX, gyroY, gyroZ, OldTime, TimeDiff;
int rotX, rotY, rotZ;///////////////////////look Data Type
int counter=0;
void setupMPU() {
  Wire.beginTransmission(0b1101000); //This is the I2C address of the MPU (b1101000/b1101001 for AC0 low/high datasheet sec. 9.2)
  Wire.write(0x6B); //Accessing the register 6B - Power Management (Sec. 4.28)
  Wire.write(0b00000000); //Setting SLEEP register to 0. (Required; see Note on p. 9)
  Wire.endTransmission();
  Wire.beginTransmission(0b1101000); //I2C address of the MPU
  Wire.write(0x1B); //Accessing the register 1B - Gyroscope Configuration (Sec. 4.4)
  Wire.write(0x00000000); //Setting the gyro to full scale +/- 250deg./s
  Wire.endTransmission();
  Wire.beginTransmission(0b1101000); //I2C address of the MPU
  Wire.write(0x1C); //Accessing the register 1C - Acccelerometer Configuration (Sec. 4.5)
  Wire.write(0b00000000); //Setting the accel to +/- 2g
  Wire.endTransmission();
}
void radioInt() {
  radio.begin();
  radio.openWritingPipe(address);
  radio.setPALevel(RF24_PA_MIN);
  radio.stopListening();
  radio.setPayloadSize(500);
  //radio.setDataRate( RF24_250KBPS );
  radio.setRetries(3,5);
}
void setup() {
  Serial.begin(2000000);
  //printf_begin();
  Wire.begin();
  setupMPU();
  radioInt();
  //Serial.print("Initializing SD card...");
  /*if (!SD.begin(chipSelect)) {

    //Serial.println("Card failed, or not present");
    return;
    }*/

  //Serial.println("SD Card is present");
  //writeToSD("Controller Startup!");
  //writeToSD("Frequency, AccX, AccY, AccZ, GyrX, GyrY, GyrZ, Front Left Damper, Front Right Damper, Rear Left Damper, Rear Right Damper,Steering");
}
/*void writeToSD(string text) { //Writes Strings to SD card
  File dataFile = SD.open("gtms.csv", FILE_WRITE);
  if (dataFile) {
    dataFile.println(text);
    //Print to the //Serial port too:
    //Serial.println(text);
    dataFile.close();
  }
  else {
    //Serial.println("error opening gtms.csv");
  }
  }*/

void recordAccelRegisters() {
  Wire.beginTransmission(0b1101000); //I2C address of the MPU
  Wire.write(0x3B); //Starting register for Accel Readings
  Wire.endTransmission();
  Wire.requestFrom(0b1101000, 6); //Request Accel Registers (3B - 40)
  while (Wire.available() < 6);
  accelX = Wire.read() << 8 | Wire.read(); //Store first two bytes into accelX
  accelY = Wire.read() << 8 | Wire.read(); //Store middle two bytes into accelY
  accelZ = Wire.read() << 8 | Wire.read(); //Store last two bytes into accelZ
  processAccelData();
}

void processAccelData() {
  gForceX = accelX / 16384.0;
  gForceY = accelY / 16384.0;
  gForceZ = accelZ / 16384.0;
  //if(gprevgForceX

  dtostrf(gForceX, 2, 2, gForceX_text);
  dtostrf(gForceY, 2, 2, gForceY_text);
  dtostrf(gForceZ, 2, 2, gForceZ_text);




}

void recordGyroRegisters() {
  Wire.beginTransmission(0b1101000); //I2C address of the MPU
  Wire.write(0x43); //Starting register for Gyro Readings
  Wire.endTransmission();
  Wire.requestFrom(0b1101000, 6); //Request Gyro Registers (43 - 48)
  while (Wire.available() < 6);
  gyroX = Wire.read() << 8 | Wire.read(); //Store first two bytes into accelX
  gyroY = Wire.read() << 8 | Wire.read(); //Store middle two bytes into accelY
  gyroZ = Wire.read() << 8 | Wire.read(); //Store last two bytes into accelZ
  processGyroData();
}

void processGyroData() {
  rotX = gyroX / 131.0;
  rotY = gyroY / 131.0;
  rotZ = gyroZ / 131.0;
}

/*void printData() {
  Serial.print(" Gyro (deg)");
  Serial.print("X=");
  Serial.print(rotX);
  Serial.print(" Y=");
  Serial.print(rotY);
  Serial.print(" Z=");
  Serial.print(rotZ);
  Serial.print(" Accel (g)");
  Serial.print(" X=");
  Serial.print(gForceX);
  Serial.print(" Y=");
  Serial.print(gForceY);
  Serial.print(" Z=");
  Serial.println(gForceZ);
  }*/
void takeDamperReading() {
  fl1 = analogRead(A0);
  fr1 = analogRead(A1);
  rl1 = analogRead(A2);
  rr1 = analogRead(A3);
  delay(DamperSamplingDelay);
  fl2 = analogRead(A0);
  fr2 = analogRead(A1);
  rl2 = analogRead(A2);
  rr2 = analogRead(A3);
  fl = (((fl2 - fl1) * conversion) / DamperSamplingDelay) * 1000;
  fr = (((fr2 - fr1) * conversion) / DamperSamplingDelay) * 1000;
  rl = (((rl2 - rl1) * conversion) / DamperSamplingDelay) * 1000;
  rr = (((rr2 - rr1) * conversion) / DamperSamplingDelay) * 1000;
  /*dtostrf(fl, 4, 3, fl_text);
    dtostrf(fr, 4, 3, fr_text);
    dtostrf(rl, 4, 3, rl_text);
    dtostrf(rr, 4, 3, rr_text);*/
  st = analogRead(A6);

}
void loop() {


   //OldTime = millis();

  recordAccelRegisters();

  recordGyroRegisters();

  takeDamperReading();

  // printData();
  //dataString = string(TimeDiff) + ", " + string(gForceX) + ", " + string(gForceY) + ", " + string(gForceZ) + ", " + string(rotX) + ", " + string(rotY) + ", " + string(rotZ) + "," + string(fl) + "," + string(fr) + "," + string(rl) + "," + string(rr) + "," + string(st);

  char realTime[120];
  snprintf(realTime, 120, "%s,%s,%s,%d,%d,%d,%d,%d,%d,%d,%d", gForceX_text, gForceY_text, gForceZ_text, rotX, rotY, rotZ, fl, fr, rl, rr, st );
  //string realTime_St = realTime;
  //Serial.println(realTime);
  bool done;
  while (!done) {
    counter += 1;
    
    
    done=radio.write(realTime, sizeof(realTime));
    //Serial.println(realTime);

  }
  counter = 0;
  //Serial.println("\n");
//Serial.println("Okay");

  //Serial.println(dataString);



  //dataString = "";
   //TimeDiff = millis() - OldTime;
  //dataString = string(TimeDiff);
   //Serial.println(TimeDiff);
  //Serial.println("\n");*/
}

Robin2:
Why are you bothering to convert all the numbers into a string when it would be much simpler to send them directly - especially if you store the values in an array or a struct?

Well I am using a 3rd party open source graphical software so that it can display Arduino data in graphical form and it requires Arduino to convert that data into strings.

Abhishek_Kuksal:
Well I am using a 3rd party open source graphical software so that it can display Arduino data in graphical form and it requires Arduino to convert that data into strings.

I understand. But be prepared for the Arduino to crash.

...R

Abhishek_Kuksal:
Well I am using a 3rd party open source graphical software so that it can display Arduino data in graphical form and it requires Arduino to convert that data into strings.

text might have been a better choice of words :wink:

Robin2:
I understand. But be prepared for the Arduino to crash.

...R

Robin, note that OP talks about string (lowercase s); the code in reply #2 does no longer contain String objects (as far as I could see).

sterretje:
text might have been a better choice of words :wink:
Robin, note that OP talks about string

Thanks. I had based my comment on the piece I quoted in Reply #3 which seemed to say that using the String class was necessary for the graphical software (which would not surprise me).

I have also assumed from Reply #2 that the program is now working as we were not told otherwise.

...R

You need to develop a protocol to break the sending message into segments that can be sent, and then reassemble the segments at the receive end.

Paul

Of corse you have to maje a program that transmit only 32 bytes in a single message. But if you need you can also transmit 64 digits in it. This only if the signs you transmit are less than 15 types (pe 10 numbers+','+'-'=12). You can working like this because you can codify the 15 or less signs into four bits, so 2 signs into a byte. You CAN'T use 16 signs because the last is 'nothing'. Of corse this method needs more time and another program

Robin2:
I have also assumed from Reply #2 that the program is now working as we were not told otherwise.

...R

Nope I still couldn't transmit more than 32char need to make a protocol. Can you help me how to break and assemble codes? as I am a mechanical engineer its too difficult to get more deep in programming.

Thank you.

Paul_KD7HB:
You need to develop a protocol to break the sending message into segments that can be sent, and then reassemble the segments at the receive end.

Paul

Can you help me? Just tell me what to google (Any beginner tutorial link that you know?) it difficult because my trade is Mechanical Engineering.
Thank you.

Silente:
Of corse you have to maje a program that transmit only 32 bytes in a single message. But if you need you can also transmit 64 digits in it. This only if the signs you transmit are less than 15 types (pe 10 numbers+','+'-'=12). You can working like this because you can codify the 15 or less signs into four bits, so 2 signs into a byte. You CAN'T use 16 signs because the last is 'nothing'. Of corse this method needs more time and another program

I still didn't understand please elaborate.
Thank you

How about sending each parameter individually

<gfX=0.1396484400>
<gfY=-0.006591796>
<gfZ=0.8986816400>
<rotX=...>
<rotY=...>
<rotZ=...>
...
...

At the receiving end, receive a message and parse it . The above is based on Robin's ideas in Serial Input Basics thread, example 3; example 4 contains a parsing and conversion example. Your receiver code does not make clear what needs to happen with the received data, so I'll leave that up to you for now; you might want to look at atof as well.

Note
You snprintf in the transmitter seems to contain mistakes (use of %d for some of the floats, e.g. fl).

Abhishek_Kuksal:
Can you help me? Just tell me what to google (Any beginner tutorial link that you know?) it difficult because my trade is Mechanical Engineering.
Thank you.

In your code in Reply #2 you have this

snprintf(realTime, 120, "%s,%s,%s,%d,%d,%d,%d,%d,%d,%d,%d", gForceX_text, gForceY_text, gForceZ_text, rotX, rotY, rotZ, fl, fr, rl, rr, st );

That is converting 3 strings, 3 ints, 4 floats and an int into the long string - that is 11 different things. However the strings have their origin in floats which makes things easier. The total number of bytes is 3x4 + 3x2 + 4x4+ 1x2 = 36 which won't quite fit a single nRF24 message. And you would save a great deal of CPU time if you don't bother to convert data into strings.

Faced with that sort of problem my first instinct would be to see if I could reduce any (preferrably all) of the floats to ints to reduce the total size. Maybe some of the ints could be reduce to bytes?

What is the biggest and smallest value that needs to be stored in each of the floats? It looks like some of the floats exist to facilitate some computations. Maybe you could send the data in its raw format and do the computations on the receiving end?

...R

IF you transmit less than 16 types of characters (like only "0123456789,-") you can codify than witch 16 elements, that are four bits (2+4+6+8=16). So you can put 2 informations into a single byte (8 bits=24 bits). In this way the numver of bytes is the same (so there is the same limitation of 32 bytes) but the informations are 64 (2 informations for byte32 bytes in a single transmition=64 informations for transmition). This kethod (that if you likebit I'll show you better) needs kore code (in both parts) and more time

Silente:
IF you transmit less than 16 types of characters (like only "0123456789,-") you can codify than witch 16 elements

I doubt very much if there is a need for such complexity if we can find out from the OP exactly what his raw data contains. With nRF24s it makes life much easier at both ends to send binary data rather than text.

...R

Of corse, mine is only a trick, of corse the best way is remove or respect the limit

sterretje:
How about sending each parameter individually

<gfX=0.1396484400>
<gfY=-0.006591796>
<gfZ=0.8986816400>
<rotX=...>
<rotY=...>
<rotZ=...>
...
...

At the receiving end, receive a message and parse it . The above is based on Robin's ideas in Serial Input Basics thread, example 3; example 4 contains a parsing and conversion example. Your receiver code does not make clear what needs to happen with the received data, so I'll leave that up to you for now; you might want to look at atof as well.

Yes, but this is going to in for DAQ system where one needs a fast scanning rate(ultimately fast wireless transmission). Sending like this wouldn't make it a time consuming process?, well i still don't know the speed of number of small packet vs one large packet for same data size ( i know i cant send one packet more than 32byte).

Note
You snprintf in the transmitter seems to contain mistakes (use of %d for some of the floats, e.g. fl).

No, that was planned because i want it to return integer value.

If speed is important, you should not send text. There might be better radio systems to send more data in one packet but it's an area that I have no knowledge of.

And your snprintf needs a cast of the float to an int; simply using %d on a float did gave me a rubbish value when I tested.

Abhishek_Kuksal:
No, that was planned because i want it to return integer value.

Have you read Reply #12 - I reckon all of what you want can be done very simply.

...R

Robin2:
In your code in Reply #2 you have this

snprintf(realTime, 120, "%s,%s,%s,%d,%d,%d,%d,%d,%d,%d,%d", gForceX_text, gForceY_text, gForceZ_text, rotX, rotY, rotZ, fl, fr, rl, rr, st );

That is converting 3 strings, 3 ints, 4 floats and an int into the long string - that is 11 different things. However the strings have their origin in floats which makes things easier. The total number of bytes is 3x4 + 3x2 + 4x4+ 1x2 = 36 which won't quite fit a single nRF24 message. And you would save a great deal of CPU time if you don't bother to convert data into strings.

Faced with that sort of problem my first instinct would be to see if I could reduce any (preferrably all) of the floats to ints to reduce the total size. Maybe some of the ints could be reduce to bytes?

What is the biggest and smallest value that needs to be stored in each of the floats? It looks like some of the floats exist to facilitate some computations. Maybe you could send the data in its raw format and do the computations on the receiving end?

...R

Now I got it what You and Silente were trying to say I here by declare that I don't care how the transmitter is sending data but at the receiver end it should assemble it and make it a string for the graphical software like what transmitter is trying to do now. Ultimately receiver should be able to parse data and able to make a string like realTime that's it.

I have tried yesterday to convert the float and negative sign integer into byte but I got failed using byte() conversion.......Because I have never used bit operation before.

Right now I have further modified the transmitter code again now the total data size is less float size is less (limited only upto 2 digit after decimal).

now the realTime will have max value of
2.00,2.00,250,250,250,250,250,250,1023
and the lower vaue of
-2.00,-2.00,-250,-250,-250,-250,-250,-250,0
It's in a systematic order.

Note* the 250 value is not limited in code but it will be physically limited.

///Transmitter///
#include <SPI.h>
//#include <SD.h>
#include <Wire.h>
#include <nRF24L01.h>
#include <RF24.h>
//#include "printf.h"
RF24 radio(6,7); // CE, C SN
const byte address[6] = "00001";
int fl2, fl1, fr2, fr1, rl2, rl1, rr2, rr1, st;
int fl, fr, rl, rr;                //changed from float to Integer
const int DamperSamplingDelay = 1;
const double conversion = 0.0488758553274682;
char gForceX_text[6];
char gForceY_text[6];
char gForceZ_text[6];
char realTime[120];
String realTime_St;
const int chipSelect = 4;
long accelX, accelY, accelZ;
float gForceX, gForceY, gForceZ;
//string dataString = "";
long gyroX, gyroY, gyroZ, OldTime, TimeDiff;
int rotX, rotY, rotZ;///////////////////////look Data Type
int counter=0;
void setupMPU() {
  Wire.beginTransmission(0b1101000); //This is the I2C address of the MPU (b1101000/b1101001 for AC0 low/high datasheet sec. 9.2)
  Wire.write(0x6B); //Accessing the register 6B - Power Management (Sec. 4.28)
  Wire.write(0b00000000); //Setting SLEEP register to 0. (Required; see Note on p. 9)
  Wire.endTransmission();
  Wire.beginTransmission(0b1101000); //I2C address of the MPU
  Wire.write(0x1B); //Accessing the register 1B - Gyroscope Configuration (Sec. 4.4)
  Wire.write(0x00000000); //Setting the gyro to full scale +/- 250deg./s
  Wire.endTransmission();
  Wire.beginTransmission(0b1101000); //I2C address of the MPU
  Wire.write(0x1C); //Accessing the register 1C - Acccelerometer Configuration (Sec. 4.5)
  Wire.write(0b00000000); //Setting the accel to +/- 2g
  Wire.endTransmission();
}
void radioInt() {
  radio.begin();
  radio.openWritingPipe(address);
  radio.setPALevel(RF24_PA_MIN);
  radio.stopListening();
  //radio.setPayloadSize();
  //radio.setDataRate( RF24_250KBPS );
  radio.setRetries(3,5);
  radio.printDetails();
}
void setup() {
  Serial.begin(2000000);
  //printf_begin();
  Wire.begin();
  setupMPU();
  radioInt();
 
}


void recordAccelRegisters() {
  Wire.beginTransmission(0b1101000); //I2C address of the MPU
  Wire.write(0x3B); //Starting register for Accel Readings
  Wire.endTransmission();
  Wire.requestFrom(0b1101000, 6); //Request Accel Registers (3B - 40)
  while (Wire.available() < 6);
  accelX = Wire.read() << 8 | Wire.read(); //Store first two bytes into accelX
  accelY = Wire.read() << 8 | Wire.read(); //Store middle two bytes into accelY
  //accelZ = Wire.read() << 8 | Wire.read(); //Store last two bytes into accelZ
  processAccelData();
}

void processAccelData() {
  gForceX = accelX / 16384.0;
  gForceY = accelY / 16384.0;
 // gForceZ = accelZ / 16384.0;

  dtostrf(gForceX, 2, 2, gForceX_text);
  dtostrf(gForceY, 2, 2, gForceY_text);
  //dtostrf(gForceZ, 2, 2, gForceZ_text);




}

void recordGyroRegisters() {
  Wire.beginTransmission(0b1101000); //I2C address of the MPU
  Wire.write(0x43); //Starting register for Gyro Readings
  Wire.endTransmission();
  Wire.requestFrom(0b1101000, 6); //Request Gyro Registers (43 - 48)
  while (Wire.available() < 6);
  gyroX = Wire.read() << 8 | Wire.read(); //Store first two bytes into accelX
  gyroY = Wire.read() << 8 | Wire.read(); //Store middle two bytes into accelY
  gyroZ = Wire.read() << 8 | Wire.read(); //Store last two bytes into accelZ
  processGyroData();
}

void processGyroData() {
  rotX = gyroX / 131.0;
  rotY = gyroY / 131.0;
  rotZ = gyroZ / 131.0;
}

/*void printData() {
  Serial.print(" Gyro (deg)");
  Serial.print("X=");
  Serial.print(rotX);
  Serial.print(" Y=");
  Serial.print(rotY);
  Serial.print(" Z=");
  Serial.print(rotZ);
  Serial.print(" Accel (g)");
  Serial.print(" X=");
  Serial.print(gForceX);
  Serial.print(" Y=");
  Serial.print(gForceY);
  Serial.print(" Z=");
  Serial.println(gForceZ);
  }*/
void takeDamperReading() {
  fl1 = analogRead(A0);
  fr1 = analogRead(A1);
  rl1 = analogRead(A2);
  rr1 = analogRead(A3);
  delay(DamperSamplingDelay);
  fl2 = analogRead(A0);
  fr2 = analogRead(A1);
  rl2 = analogRead(A2);
  rr2 = analogRead(A3);
  fl = (((fl2 - fl1) * conversion) / DamperSamplingDelay) * 1000;
  fr = (((fr2 - fr1) * conversion) / DamperSamplingDelay) * 1000;
  rl = (((rl2 - rl1) * conversion) / DamperSamplingDelay) * 1000;
  rr = (((rr2 - rr1) * conversion) / DamperSamplingDelay) * 1000;
 

}
void takeSteeringReading(){
  st = analogRead(A6);
  
}
void transmitRadioData(){
 bool done=0;
  while(!done){
    done=radio.write(&realTime,sizeof(realTime));
  }
   /*
    realTime_St = realTime;//convert to string
   for(int i = 0; i < realTime_St.length(); i++) {
        int sendingChar[1];
        sendingChar[0] = realTime_St.charAt(i);
        if(!radio.write(&sendingChar, 1)) {
          Serial.println("failed");
          return;
        }
        else{
          //Serial.println(sendingChar[0]);
        }
      }*/
}
void loop() {


   //OldTime = millis();

  recordAccelRegisters();

  recordGyroRegisters();

  takeDamperReading();
 takeSteeringReading();
  // printData();
  

  
  //snprintf(realTime, 120, "%s,%s,%s,%d,%d,%d,%d,%d,%d,%d,%d", gForceX_text, gForceY_text, gForceZ_text, rotX, rotY, rotZ, fl, fr, rl, rr, st );
  snprintf(realTime, 120, "%s,%s,%d,%d,%d,%d,%d,%d,%d,%d", gForceX_text, gForceY_text, rotX, rotY, rotZ, fl, fr, rl, rr, st );  // without acceleration in z axis
  
  Serial.println(realTime);
  transmitRadioData();//sends it wirelessely
  
}

This was transmitter side

///Receiver///
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>

RF24 radio(3,7); // CE, CSN
long y, x;
bool done;
char text[40];
const byte address[6] = "00001";
void setup() {
  Serial.begin(2000000);
  radioInt();
}
void radioInt(){
  radio.begin();
  radio.openReadingPipe(0, address);
  radio.setPALevel(RF24_PA_MIN);
  radio.startListening();
  //radio.setDataRate( RF24_250KBPS );
  radio.setRetries(3,5);
  radio.setPayloadSize(120);
}

void loop() {
  //x=micros();
  bool done = 0;
  while (!done) {
    //x=micros();// to check scanning rate
    if (radio.available()) {

      
       radio.read(&text, sizeof(text));
      Serial.println(text);

      
    }
   // y=micros()-x;
 // Serial.println(y);//to print scanning rate 
  }
 }

This was receiver side.....and yes that is a good idea to put receiver in some work as you can see the receiver is doing nothing just receiving and printing.....we can assemble our code here and convert it to string like realTime.

Thank you.