Question: What are the functions for printing
to the Serial monitor and printing to the Serial monitor on a new
line?
Answer:
- Serial.print()
- This function is used to print on the Arduino's serial monitor.
This function prints the content without introducing any newline at
the end.
For example:
The above output has no newline after each number because here
Serial.print() has been used.
- Serial.println() - This
function is also used to print on the serial monitor but this
function leaves a new line at the end of the output.
For example:
The output has a new line after each number because we have used
Serial.println() here.