Problem with Serial.read and bigger numbers

AWOL:

I'm able to only read 5 digit numbers so if I want to write 10 I'd have to write 00010.

There are a couple of things to bear in mind here:

  1. An Arduino "int" holds at most only five decimal digits. To hold more, you need a "long" or unsigned long". Or even a "long long"
  2. Some methods of converting ASCII to "int" will consider "00010" to have the decimal value 8 - a leading '0' denotes an octal value.

an int can also hold a - sign ==> in theory in 50% of the cases (in practice probably less)
an unsigned int will hold 5