Dear David (@David_Vyhmeister ),
but is your Arduino code the one you posted in your first message ?
If so, please be aware that it's not sending anything on the BT line.
In your code you use the:
Serial.println(TEMPERATURA);
Serial.println("|");
......
and so on, but the Serial.print() just sends to the PC monitor.
To send to the BT line you shall send data by using the miBT serial line instead.
In this way
miBT.print(TEMPERATURA);
miBT.print("|");
.......
'till the last sending, in which you shall use the miBT.println("|") to close the frame.
(i.e. just print for the values and the delimiters, and println for the the last one).
Also by reading your Arduino code: why are you waiting characters from the BT to allow reading the sensors? This means that your AI2 code is triggering the readings ? In my understanding the aim of your application is to send sensors' data from the Arduino board to the phone. In this case you don't have to wait nothing from the phone and just to send out every second (your delay(1000)) the acquired values. Something like:
void loop()
{
//DISTANCIA ULTRASONIDO
digitalWrite(TRIG, HIGH);
delay(1);
digitalWrite(TRIG, LOW);
DURACION = pulseIn(ECHO, HIGH);
DISTANCIA = DURACION / 5.82;
TEMPERATURA = dht.readTemperature(); // obtencion de valor de temperatura
HUMEDAD = dht.readHumidity(); // obtencion de valor de humedad
Serial.print("TEMPERATURA: "); // value to the PC monitor
Serial.println(TEMPERATURA); // each value on a new line (only on PC monitor)
miBT(TEMPERATURA); // value to the BT
miBT.print("|"); // data separator to the BT
Serial.print("HUMEDAD: "); // value to the PC monitor
Serial.println(HUMEDAD);
miBT.print(HUMEDAD); // value to the BT
miBT.print("|"); // data separator
Serial.print("DISTANCIA :"); // value to the PC monitor
Serial.println(DISTANCIA);
miBT.print(DISTANCIA); // value to the BT
miBT.println("|"); // close the BT frame
delay(1000);
} // end loop
Hoping this helps.
Cheers, Ugo.