![]() | Arduino to Android Bluetooth on data event |
|
27 Feb 2013, 16:10
Jim Poyzer (2 posts) |
Can you define the expected format of the data in onBluetoothDataEvent(String who, byte[] data) or the message in KetaiOSCMessage m = new KetaiOSCMessage(data)? Such as is used in the Bluetooth Cursors example sketch? I’m trying to create the a correctly formatted bluetooth message on the Arduino. I’m close but can’t maintain the message length. I’m sending a message from the Arduino in a format as ”/myAddrPattern/,ii23” where the 2 and 3 are sent as byte. I can see ”/myAddrPattern/,ii23” in the data coming from the onBluetoothDataEvent but it is not a valid message as in: KetaiOSCMessage m = new KetaiOSCMessage(data); if (m.isValid()) I cannot parse the data and get my integers “23”. I get random pieces of the data message. Am I missing a control character? Hence my question: Can you define the proper structure of the message? Is it the same as the OSCP5 messages? What WE need is some sample messages created on an Arduino. |
| You must be logged in to comment |

