Serial port error

I recently started writing programs with, but I always receive number + 48. Just like I send 0, I get 48. Please help.

Look up 'ASCII table' on the internet and see if you can see why?

The method always returns a byte data type that reflects the character that was received. If you look up the ASCII code for the digit character '0', you will find it is 48.

You are receiving the ASCII representation of the characters. ASCII for 0 is 48 decimal or 0x30 hex. It is common practice, when receiving numbers, to subtract 48 from the received character to turn it into a number.