Firstly, I bought the book with the hope that it would help me get an Arduino with BT module talking to an Android app built with Processing. It has succeeded where many other tutorials and approaches have failed! The rest of the Ketai library and book look fascinating and I look forward to digging into it further. So thanks and congrats on a great book.
But, I have a problem I hope you might be able to help with. I have everything set up and I am successfully sending data from the Arduino via Serial.write(). In the Processing/Android app, onBluetoothDataEvent() fires and I receive data. But, the data received only corresponds when I send a value between 0-127 from Arduino. In addition, if I send values in rapid succession, I seem to see multiple values in the byte array whereas, if I force a delay (currently 500ms) each packet of data sent triggers a distinct onBluetoothDataEvent().
So, I observe the significance of the number 127: I think its somehow related to the fact that data is being sent as distinct bytes? But, I’ll be honest, I am quickly stepping way beyond my realms of understanding as I try and understand what is going on “under the hood” here! Is there a better (more intuitive) way for me to send and receive the data from the Arduino? Can you give me some pointers or point me in the direction of what I need to know in order to better understand what is going on here (I would google if I only knew what I should be googling for)?
The Arduino setup is an Uno with BT module and ultimately what I’m trying to do is send the values of a potentiometer and two rotary encoders to the Android device.
Many thanks in advance.