Converting char to int

have a look at the examples in serial input basics