The serial works pretty much like an TERMINAL, but the functions are a little bit different Since serial is a port used for communication, its latency is a bit high, and it probably doesn't raise an interrupt on the microcontroller. Therefore, the arduino can't listen to it constantly, like in a computer. So, you can't simply scanf() for a variable, but you can print(), since print is a output stream. Idk if I made myself clear, but whenever you are trying to read values from the serial, you will have to use other functions, rather than scanf(), from C. Take a look: http://arduino.cc/en/Reference/Serial You have some functions, like read(), parseInt(), etc. Take a look! There are all the functions and working examples there. The documentation is always a great way to start. Lemme know if you need further help