Sending dates via bluetooth

Hi

I want to control my mouse cursor with mpu-6050 via bluetooth. I don't know how to send 3 dates simultaneously. I need to send angle_x, angle_y and click(button), but i don't know how to do this.
The bluetooth module send characters and i need to convert dates from char to int.
I'll control my cursor with mouse.move(angle_x, angle_y)
I find this code for char->int conversion:

void loop()
 {
   recvWithEndMarker();
 //showNewData();
 int16_t x = atoi(receivedChars);
 }

 void recvWithEndMarker() {
  static byte ndx = 0;
 char endMarker = '\n';
 byte rc;

  // if (Serial.available() > 0) {
       while (BTserial.available() > 0 ) {
rc = BTserial.read();

if (rc != endMarker) {
  receivedChars[ndx] = rc;
  ndx++;
  if (ndx >= numChars) {
    ndx = numChars - 1;
  }
}
else {
  receivedChars[ndx] = '\0'; // terminate the string
  ndx = 0;
  newData = true;
}
 }
 }

 void showNewData() {
 if (newData == true) {
  // Serial.print("This just in ... ");
   Serial.println((char*)receivedChars);
 newData = false;
  }
 }

Please explain what you are trying to do exactly. How do you intend to move the mouse?

Is mouse.move() processing code?

All I see is code, that receives chars via Bluetooth and prints them to the serial port.

lg, couka

I don't know how to send 3 dates simultaneously.

First, you can't do anything simultaneously. You could send three VALUES in succession. Sending 3 dates is impossible, though. Dates are too sticky and gum up the serial port.

Plums are easier.

The bluetooth module send characters and i need to convert dates from char to int.

Where?

Why did you take Robin2's well formatted example and butcher the formatting like that? Use Tools +Auto Format to fix it!

couka:
Please explain what you are trying to do exactly. How do you intend to move the mouse?

Sorry for my english.

I'll use 2 bluetooth module, 2 arduino, mpu and button.
Values from mpu and button will be sent from sender bluetooth module to receivers module. I'll use arduino micro and i'll control my mouse cursor with Mouse.move() and Mouse.click()

I want to send values: angle_x, angle_y and button with BTserial.println() function.
BTserial.println(angle_x);
BTserial.println(angle_y);
BTserial.println(button);

The bluetooth module send character and i neet to convert dates from char to int. I can send values, but the receivers module don't know what values are received.
I think i need to send a character reference before the 3 values.
Something like this: | angle_x angle_y button | angle_x angle_y button |..... and so on. After | i know that angle_x, angle_y and button will be sent.
Where is | means that

The bluetooth module send character and i neet to convert dates from char to int.

No, you need to convert data from array of char to int. But, that means that you need to have a NULL terminated array of chars to convert.

Show the code that collects the data in a NULL terminated array of chars.

FYI: Serial Input Basics - Programming Questions - Arduino Forum

PaulS:
Show the code that collects the data in a NULL terminated array of chars.

FYI: Serial Input Basics - Programming Questions - Arduino Forum

What do you mean? I put the code in first post.
My problem is that the receivers module don't know what values have been received for x, y and button.
I don't know how to modify this code. I'll try today to send all 3 dates with startmarkers, something like this: ^ x y button ^ x y button ^ x y button.

void loop()
 {
   recvWithEndMarker();
 //showNewData();
 int16_t x = atoi(receivedChars);
 }

 void recvWithEndMarker() {
  static byte ndx = 0;
 char endMarker = '\n';
 byte rc;

  // if (Serial.available() > 0) {
       while (BTserial.available() > 0 ) {
rc = BTserial.read();

if (rc != endMarker) {
  receivedChars[ndx] = rc;
  ndx++;
  if (ndx >= numChars) {
    ndx = numChars - 1;
  }
}
else {
  receivedChars[ndx] = '\0'; // terminate the string
  ndx = 0;
  newData = true;
}
 }
 }