Hello
I want to receive digital pin value (1(high) or 0(low)) from an Arduino by the serial port. Arduino can send 1 or 0. but i can not receive by android.
here is my android code:
[code]
byte[] bbuffer = new byte[1];
try {
mInputStream.read(bbuffer);
} catch (IOException e) {
new Exception("Arduino-Board antwortet nicht! Timeout!!");
}
if (bbuffer[0] == (byte)1){
PinValue.setText("HIGH");
}
else if (bbuffer[0] == (byte)0){
PinValue.setText("LOW");
}
[/code]