it2901g10/GROUP10-baf_sintef_arduino — Issue #18: ArduinoConnection
Author: strykejern
Created: 2012-02-02 16:15:03+00:00
State: open

ArduinoConnection class to transfer and receive data from arduino.
Needs to support connection from desktop and Android

.
send(byte[]): byte[] data
This method sends byte data and returns raw data. Usually just the ACK for received data, but sometimes its a response if it was etc requested state of a button or the current accelometer data. The extended ArduinoShield class then usually call this if it wants to know a state of its shield.

.
listenForData(): DataPacket packet
A thread listens to this channel to find if a new event on arduinoboard happens. When new data arrives, it checks if we have a listener.

.
(We need to be able to disable listening to a channel so we saves battery. This has to be done with the send(byte[]) with and instruction to the shield that we do not want updates)