Since the Arduino has a serial interface, we can also use this to see current values from the Arduino or to communicate directly with a computer. To use the serial interface, we only need to call the Serial.begin () function in setup (). Then we can use the Serial.print () or Serial.println () function to output any values. The Arduino IDE also has its own monitor. An example of serial communication looks like this:
The corresponding baud rate must be selected in the serial monitor to display information and then the data is displayed. The monitor looks like this.
This example will send back over serial everything it receives until it finds a line break symbol.
Serial - The Arduino reference page