It seems that the serial monitor reads a minus sign as -3, then read 1 as 1 (which is correct, except the negative sign).
Here's the code:
- CODE: SELECT_ALL_CODE
void loop() {
while (!Serial.available()); // wait until there was signal send from computer
inByte = Serial.read();
inByte = inByte-48; // minus 48 (30 hex) to get the decimal value (got from Cytron tutorial)
Serial.print("I received: ");
Serial.println(inByte);
}
I've been googling around but not yet found any solution