I’m currently using the Bluetooth LE for iOS, tvOS and Android asset. My issue is with sending bytes from Arduino to the Android app that I made. I can receive data, but then it stops after a few lines of receiving floats. Data continues to be sent on the Arduino side with a delay of 20ms.
Unity c# Code:
BluetoothLEHardwareInterface.Log(string.Format("data length: {0}", data.Length));
if (data.Length == 0)
{
// do nothing
}
else
{
f = BitConverter.ToSingle(data, index); index += 100;
BluetoothLEHardwareInterface.Log("data: " + f.ToString());
receiveText(f.ToString());
//string s = ASCIIEncoding.UTF8.GetString(data);
}