How Do I Use Serial Monitor Correctly?
Serial Monitor is a simple text window for debugging. It only works if the settings match your code.
Basic setup
- Call
Serial.begin(9600);insetup(). - Open Serial Monitor from Tools.
- Set the baud rate to the same value.
- Pick the right line ending if your code expects it.
Common mistakes
- Baud rate does not match.
- Using the wrong serial port.
- Expecting input without line endings.
Bottom line
Match the baud rate and line ending to your code. That fixes most Serial Monitor issues.
Related: Why do I get garbage characters in Serial Monitor? · Why does my code compile but not work? · What does this error message mean?