Android Question arduino to B4a with bluetooth

howard bassen

Member
Licensed User
Longtime User
Does anyone have a working example of B4a code that receives and sends data via Bluetooth between an Arduino and B4a. I have the arduino side working.
 

raphael75

Active Member
Licensed User
Longtime User
From Arduino side you probably use the 'println(...)' command to send ASCII sentences finishing with 0x0D 0x0A (CRLF). So for your B4A code you should use the Serial, BluetoothAdmin and AsyncStreams libraries, and the AsyncStreamsText module to detect complete sentences coming from the Arduino.
You can have a look on these pages:
https://www.b4x.com/android/forum/pages/results/?query=arduino+bluetooth
https://www.b4x.com/android/forum/pages/results/?query=bluetoothadmin
https://www.b4x.com/android/forum/pages/results/?query=asyncstreams
https://www.b4x.com/android/forum/pages/results/?query=AsyncStreamsText
 
Upvote 0
Top