alexrush:
So I can just do that with Serial.print and if statements?
Exactly.
Furthermore, there are prebuilt functions like parseInt() and so on that automatically parse byte read inputs into an int or so.
(to know that: Serial.read() gives you a single byte of the buffer, so use something like while Serial.available()>0 do ....)