Each time I enable the second (it does the same thing if there is only one BT IsConnected and everything is under the first 'if BluetoothClient1.IsConnected' routine also) block that uses 'if BluetoothClient1.IsConnected' and connect to the HC05 Bluetooth module/Arduino, my app freezes.
I'm trying to send something simple, 2 label=value, delimited by a pipe symbol. What am I doing wrong?
currentTimeStamp = millis();
if ((currentTimeStamp - btLastSendTimeStamp) > 2500)
{
BTSerial.write("lblTest1=2|lblTest2=0");
btLastSendTimeStamp = millis();
Serial.println("Sending Bluetooth Data");
}
Thanks. I do have it configured to 10. I actually got it working about 5 minutes ago by changing that -1 for acall BluetoothClient1.BytesAvailableToReceive .
Is that an effective way, or should I go back to the -1 and use println? What do you suggest? I'm getting random errors in App Inventor, where it appears that App Inventor is receiving sections of bytes at times, rather than a batch of bytes that would equate to the entire stream I want to send, is this related?