Data input via serial UART

or, convert the Char to an int?

int n = c - '0';

For one digit numbers, that works.