arduino bluetooth serial problem

hi i’m working on a project that uses bluetooth to send some values from an arduino to the other.
the problem is that the receiver needs to do a lot of calcs and so i can’t just throw data at him with the transmitter. how can i make the transmitter send data on request?

here’s trasmitter’s send data function thatsends data as soon as it can:

bt.print(val1);
  bt.print(":");
  bt.print(val2);
  bt.print(":");
  bt.print(val3);
  bt.print(":");
  bt.print(val4);
  bt.print("/");

and here’s the complete receiver code:

#include <SoftwareSerial.h>

SoftwareSerial Serial3(8, 7);

int btval[4]         = {};
String readString;
String str1, str2, str3, str4; //data String
char c = ' ';
int ind1, ind2, ind3, ind4; // ,locations

void setup() {
  Serial.begin(9600);
  Serial3.begin(57600);
}

void loop() {
  decrypt();
  for (int i = 0; i < 4; i++) {
    if(btval[i]>150){
      btval[i]=150;
    }
    Serial.print(btval[i]);
    Serial.print("  ");
  }
  Serial.println();
}

void decrypt() {
  for (;;) {
    if (Serial3.available()) {
      c = Serial3.read();
      Serial.print(c);
      if (c == '/') {
        ind1 = readString.indexOf(':');
        str1 = readString.substring(0, ind1);
        ind2 = readString.indexOf(':', ind1 + 1 );
        str2 = readString.substring(ind1 + 1, ind2);
        ind3 = readString.indexOf(':', ind2 + 1 );
        str3 = readString.substring(ind2 + 1, ind3);
        ind4 = readString.indexOf(':', ind3 + 1 );
        str4 = readString.substring(ind3 + 1);
        delay(5);
        if (str1.toInt() != 0 and str2.toInt() != 0 and str3.toInt() != 0 and str4.toInt() != 0) {
          btval[0] = str1.toInt();
          btval[1] = str2.toInt();
          btval[2] = str3.toInt();
          btval[3] = str4.toInt();
        }
        readString = "";
        str1, str2, str3, str4 = "";
        break;
      }
      else {
        readString += c;
      }
    }
  }
  Serial.print("  ");
}

how can i solve this?

SoftwareSerial Serial3(8, 7);

and

  Serial3.begin(57600);

That probably won't work. SoftwareSerial doesn't work reliably above 9600 baud.

the problem is that the receiver needs to do a lot of calcs and so i can't just throw data at him with the transmitter.

If it has to do a lot of calculations don't throw away processing time by using that crippled SoftwareSerial class. It will block the complete processor (including interrupts) during the sending and the reception of whole bytes. Why don't you just the hardware serial interface?

how can i make the transmitter send data on request?

That's easy: just send it only after the other side requested it. The connection is bi-directional.