Question by
conzerz · Oct 16, 2018 at 10:53 PM ·
androidaccelerometerbluetooth
Unity BLE Bluetooth from BNO055 connected to Arduino
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);
}
Comment
Answer by Tony686 · Jun 13, 2019 at 06:55 PM
Hello, i usually use this plugin https://www.assetstore.unity3d.com/#!/content/98960 to communicate with arduinos via bluetooth, its very reliable, you can try it and i can help you!
Thanks Tony, I think this will solve our problems.
Does this Plugin has a User $$anonymous$$anual and examples to use it ??
@Genc_$$anonymous$$uhammed yes a documentation is included!