Android app updated (now the Android app acts even as client using the

device's accelerometers).
This commit is contained in:
Daniele Verducci
2014-03-16 12:43:55 +01:00
parent ecb44abd7a
commit 8aa13953ee
38 changed files with 418 additions and 207 deletions

View File

@@ -64,11 +64,13 @@ void loop(){
}
boolean readGamepadPositionFromSerial(){
if(Serial.available()>1){ //Bytes received in pairs
if(Serial.available()==2){ //Bytes received in pairs
gamepadPosition[0] = Serial.read();
gamepadPosition[1] = Serial.read();
return true;
}
} else { //Data corruption: even bits!
Serial.readBytes(NULL, Serial.available());
}
return false;
}