Serial coms

Montmorency:
This means that you are making things up. You are NOT sending 1.

You are sending 49 (aka '1') and then you are sending 10 (which is line-feed character code)

You're splitting hairs - he knows he's sending 49 else he wouldn't have subtracted '0' from the read value.

Montmorency:
Then you receive 10, from with you again subtract 48 and end up with -38.

Although I didn't specify exactly why, my previous suggestion already remedies this...

Montmorency:
Please, stop mixing integer constants and character constants. This will only confuse people. And it obviously confuses you as well. 1 and '1' are two completely different things.

Subtracting by '0' is commonplace and isn't confusing to those who have a basic understanding of ASCII