I've just started learning about the Arduino and I would like to send data from my PC to my Arduino Uno. I would like to write a program that uses the Serial Monitor to prompt the user for information, allows the user to enter some numbers, then stores those numbers in variables to be used later in the program. For example, I would like the screen to prompt "ENTER DISTANCE", after which the user might type "12345" and then hit the ENTER key. An integer variable inside the program would then have the value of 12345.
This seems like it should be simple to do, but it appears to me that the Serial Library works only with ascii data and does not have a way of converting the ascii data to decimal data. It seems to me that using Serial.read() ends up providing me with ascii codes for each individual digit (1, 2, 3, 4, 5) and not for the actual numerical value of 12345. Am I doing something wrong with this? Is there some easy way to transform the entered data back to decimal or am I just being stupid?