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

  1. Call Serial.begin(9600); in setup().
  2. Open Serial Monitor from Tools.
  3. Set the baud rate to the same value.
  4. 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?