I have an example Android app that I compiled in Eclipse and installed on my Android tablet. It establishes communication between my tablet and my Arduino board.
It is an example program from this link: “Seeeduino Demo – Android App” on this URL:
http://www.seeedstudio.com/wiki/index.php?title=Seeeduino_ADK_Main_Board
There is a section that simply sends one byte from my tablet to the Arduino board.
byte data;
data=1;
server.send(new byte[] {(byte) data});
It works, but it sends other bytes besides the one byte. I need to understand how this server.send() function works, but I can find nothing about it in the Android references.
Can anyone point me to a reference that covers the server.send() function? I would like to send exactly one byte at a time and nothing else.
I had a quick look at the source for the MicroBridge. The following is the working part of the
sendmethod:I would say that there is data in the pipe and is getting writen out with the call to
output.flush().The source for MicroBridge can be found here: MicroBridge
Hopefully this gets you started.