Hi
I’m trying to send data from the Arduino to mobile app and I’m getting a wired result and I’m unsure why I will try and send HelloWord from the Arduino and it comes out on the B4A Log as the following
>H
>elloWorld
I have added the code I’m using below I got the code from the demo Bluetooth message app I have change the AStream.Initialize so its non-prefix, I’ve also change the code in the demo Bluetooth chat app so I can test it on the phone and it outputting the message on 2 line like the result above.
BluetoothManager
SettingHome
Arduino Code
i’m sending HelloWorld and its is not coming across complete on the mobile app
Log Results from B4A
>H
>elloWorld
Thanks,
Ricky
I’m trying to send data from the Arduino to mobile app and I’m getting a wired result and I’m unsure why I will try and send HelloWord from the Arduino and it comes out on the B4A Log as the following
>H
>elloWorld
I have added the code I’m using below I got the code from the demo Bluetooth message app I have change the AStream.Initialize so its non-prefix, I’ve also change the code in the demo Bluetooth chat app so I can test it on the phone and it outputting the message on 2 line like the result above.
BluetoothManager
B4X:
AStream.Initialize(serial.InputStream, serial.OutputStream, “astream”)
Private Sub AStream_NewData (Buffer() As Byte)
CallSub2(SettingHome, “NewMessage”, BytesToString(Buffer, 0, Buffer.Length, ”UTF8”))
End Sub
SettingHome
B4X:
Public Sub NewMessage (msg As String)
Log(msg)
End Sub
Arduino Code
B4X:
bluetooth.print("HelloWorld");
i’m sending HelloWorld and its is not coming across complete on the mobile app
Log Results from B4A
>H
>elloWorld
Thanks,
Ricky