SEND RECEIVE MULTIPLE DATA

If I have understood the OP correctly, I would like to go this way to take care of his issue:
1. Conceptual View of Hardware (UNO-NANO) using Software UART Link for Data Communication

Figure-1: Connection diagram between UNO and NANO using Soft and Hard UART Link (Test Circuit)

2. Program Codes to send the values of 5 pots in one telemetry frame at 2-sec interval
(a) The values of PM0 (Pot to control the shaft position of Servo Motor 0), PM1, PM2, PM3, and PM4 are mapped and the corrsponding 8-bit values are stored in the array named : byte potMapTxArray[5]; in the codes of Transmitter.

(b) The contents of potMapArray[5] are transmitted to NANO using Intel-Hex formatted Telemetry Scheme. For example: When A0 - A4 pins are engaged with 1V, 2V, 3V, 4V, and 5V respectively, the potMapTxArray[5] contains 0x28, 0x48, 0x69, 0x89, 0xAA. The Intel-Hex Frame of these bytes is this – :0510000028486989AADF. The actual transmission of this frame on the TX line of UNO is like this (every symbol is transmitted as its 8-bit ASCII Code) – 3A 30 35 31 30 30 30 30 30 32 38 34 38 36 39 38 39 41 41 44 46.

(c) The Receiver (NANO) receives the frame and extracts the original values of the potMapTxArray; the values are saved in the potMapRxArray[5].

(d) The application program takes the values from potMapRxArray and distributes them among the servos – SM0 to SM4 (Fig-1).

Transmitter Codes:

#include<SoftwareSerial.h>
SoftwareSerial mySerialBTUNO(6, 7);  //SRX = DPin-6, STX = DPin-7

byte potMapTxArray[5];
unsigned long prmillis = 0;
byte frameArray[11];   //1(: START) + 1 (Information bte) + 2 (address) + 1 (EOF) + 5(inf) + 1(CHKSUM)  

void setup()
{
  Serial.begin(9600);   //Serial Monitor-1 is ON
  mySerialBTUNO.begin(9600);
  analogReference(DEFAULT);   //5V is the Full scale of ADC
}

void loop()
{
  do
  {
    ;
  }
  while (millis() - prmillis < 2000);
  prmillis = millis();
  //---------------------
  for (int i = 0, j = 14; i < 5, j < 19; i++, j++)
  {
    potMapTxArray[i] = (byte)map(analogRead(j), 0, 1023, 0, 180);
    Serial.println(potMapTxArray[i], HEX);   //printing mapped values on Serial Monitor---
  }
  

  //--Sending mapped values of PM0 - PM1 (potArra[5]) to NANO---
  //using
  buildFrame();
  sendFrame();
  Serial.println("=============================");

}

void buildFrame()
{
  // byte *ptr = (byte*) &x; //decl. of pointer var. for binary32 formatted value of a flp number

  frameArray[0] = 0x3A;   //: statrt of a frame

  frameArray[1] = 05; //number of information byte = number of bytes for floating point number

  frameArray[2] = 0x10;   //lower byte of the buffer address: 0x0010
  frameArray[3] = 0x00;   //upper byte of the buffer address: 0x0010

  frameArray[4] = 0x00; //code to mark end-of-file (0x01 = EOF) when sending data from file
  //-------------------

  for (int i = 5, j = 0; i < 10, j < 5; i++, j++) //saving 4-byte binary32 vale for a flp number
  {
    frameArray[i] =  potMapTxArray[j];
  }

  frameArray[10] = chkSum();         //creating normal sum based CHKSUM for error control

}

byte chkSum()  //CHKSUM algorithm: all bytes offrame except :; discard carry; take 2's Compl.
{
  byte sum = 0;
  for (int k = 1; k < 10 ; k++)
  {
    sum += frameArray[k];
  }
  sum = ~sum;
  sum++;
  return sum;
}
//-------------------------------------------------------
void sendFrame()                //conver digit to ASCII and write to HC-12 for transmission
{
   mySerialBTUNO.write(frameArray[0]);     //always send the synchronizer marker (:) as binary code
   Serial.print((char)frameArray[0]);    //show the character on Hard Serial Monitor
  
  for(int i = 1; i<11; i++)
  {
    byte x = frameArray[i];
//    Serial.print(frameArray[i]);
    byte x1 = x;
    x1 = x1>>4;
    if (x1 <=9)
    {
      x1 = x1+0x30;             
      mySerialBTUNO.write(x1);      //transmit: 0x30 - 0x39 for 0 - 9 for the 1st digit of a byte
       Serial.write(x1);
       //HERE: goto HERE;
    }
    else
    {
      mySerialBTUNO.write(x1+0x37);  //transmit: 0x41 - 0x46 for A - F for the 1st digit of a byte
       Serial.write(x1+0x37);
    }
  //--------------------------------
    x = frameArray[i];
    x = x & 0x0F;
    if (x <=9)
    {
      x = x+0x30;
      mySerialBTUNO.write(x);      //transmit: 0x30 - 0x39 for 0 - 9 for the 2nd digit of a byte
       Serial.write(x);
    }
    else
    {
      mySerialBTUNO.write(x+0x37);  //transmit: 0x41 - 0x46 for 0=A - F for the 2nd digit of a byte
       Serial.write(x+0x37);
    }
    
  } 
  Serial.println();    //enter new line 
}

Receiver Codes:

#include <Servo.h>

Servo myservo0;//[5];//0;
Servo myservo1;
Servo myservo2;
Servo myservo3;
Servo myservo4;  // create servo object to control a servo

bool flag = false;          //Frame synchronizer has not come
byte frameArray[21];
byte potMapRxArray[5];
byte x, y, y1;
int i = 0;
int j = 0;

void setup()
{
  Serial.begin(9600);             // Serial port to computer
 // for (int i=0, j=8; i<5, j<13; i++, j++)
 // {
 //   myservo[i].attach(j);
 // }
  myservo0.attach(8);  // attaches the servo on pin 9 to the servo object
  myservo1.attach(9);
  myservo2.attach(10);
  myservo3.attach(11);
  myservo4.attach(12);

}

void loop()
{
  if (i == 21) //complete frame is received
  {
    buildpotMapRxArray();  //nuumber in: z, p, and myData[] of union{}
    i = 0;
    flag = false;
    i = 0;
    j = 0;
  }

    myservo0.write(potMapRxArray[0]);
    delay(15);
    myservo1.write(potMapRxArray[1]);
    delay(15);
    myservo2.write(potMapRxArray[2]);
    delay(15);
    myservo3.write(potMapRxArray[3]);
    delay(15);
    myservo4.write(potMapRxArray[4]);
    delay(15);

}

void buildpotMapRxArray()
{
  //cli();
  Serial.println();//write(frameArray[18]);
  // HERE: goto HERE;

  for (i = 9, j = 0; i < 19, j < 5; i++, j++)
  {
    y = frameArray[i];
    if (y < 0x41)
    {
      y = y & 0x0F;
      y = y << 4;
    }
    else
    {
      y = y - 0x37;
      y = y << 4;
    }
    // Serial.println(y, HEX);
    //-------------------
    i = i + 1; //i++;
    y1 = frameArray[i];
    if (y1 < 0x41)
    {
      y1 = y1 & 0x0F;

    }
    else
    {
      y1 = y1 - 0x37;

    }
    //------------------------
    y = y | y1;
    potMapRxArray[j] = y;
  }
  Serial.println(potMapRxArray[0], HEX);
  Serial.println(potMapRxArray[1], HEX);
  Serial.println(potMapRxArray[2], HEX);
  Serial.println(potMapRxArray[3], HEX);
  Serial.println(potMapRxArray[4], HEX);
  Serial.println("======================");
}


void serialEvent()
{
  if (flag == true)
  {
    while (Serial.available())
    { //Serial Port has data
      x = Serial.read();
      Serial.write(x);     // Send the data to Serial monitor
      frameArray[i] = x;    //save in array
      i++;
    }
  }

  else
  {
    byte s = Serial.read();
    if ( s != 0x3A)
    {
      flag = false;
    }
    else
    {
      if ( s == 0x3A)
      {
        Serial.write(s);
        flag = true;
        i++;
      }
    }

  }
}

3. Testing Procedures
(a) Place 5x2.2k network at the UNO side of Fig-1. Let us engage the AO, A1, A2, A3, and A4 pins of the UNO at the 1V, 2V, 3V, 4V, and 5V points of the 5x2.2k network respectively.

(b) Connect the Control Line (signal pin/orange wire) of a Tower Pro (SG90) type servo with DPin-D8 of the NANO (Fig-1).

(c) Connect UNO and NANO as per Fig-1.

(d) Open an IDE-1 and upload Transmitter Codes into UNO.

(e) Open IDE-2 and upload Receiver Codes into NANO. While uploading in NANO, let us hold down the RESET button of UNO.

(f) Bring in the Serial Monitors for both IDE-1 and IDE-2.

(g) Check that the following messages have appeared on the Serial Monitors.

Figure-2: Transmitted and Received frames on the Serial Monitors

(h) Change the position of the Control Line of the servo from D8 to D9, D10, D11, and D12 pins of the NANO. Observe that the shaft positions of the servo changes.

4. Power down of both UNO and NANO and disconnect the UART Link and GND Line.

5. Connect the Bluetooth Modules (HC05) with UNO and NANO as per following diagram. Pair the Bluetooth Modules.

Figure-3: Connection digarm among UNO-HC5 and HC5-NANO

6. Power up both UNO and NANO; press RESET buttons and bring in Serial Monitors. Repeat Step-3; the system should work (not tested).

GolamMostafa:
(b) The contents of potMapArray[5] are transmitted to NANO using Intel-Hex formatted Telemetry Scheme. For example: When A0 - A4 pins are engaged with 1V, 2V, 3V, 4V, and 5V respectively, the potMapTxArray[5] contains 0x28, 0x48, 0x69, 0x89, 0xAA. The Intel-Hex Frame of these bytes is this -- :0510000028486989AADF. The actual transmission of this frame on the TX line of UNO is like this (every symbol is transmitted as its 8-bit ASCII Code) -- 3A 30 35 31 30 30 30 30 30 32 38 34 38 36 39 38 39 41 41 44 46.

Golly Gosh.

...R