Guides / Using Arduino IDE's Serial Plotter

Using Arduino IDE's Serial Plotter

Learn how to use Arduino IDE's serial plotter to visualise data.

What is it?

The serial plotter is a feature of Arduino IDE for visualizing data in an easy-to-read way, it's great for showing values that change over time like sensor values.

How to use it?

The serial monitor is super easy to use, you just print the variable to serial with a name separated by a colon. Multiple values must be separated by a comma.

Example Code

To print a single value you can do something like this.

// Variable label

Serial.print("Sonar:");

// Use println for only the last statement

Serial.println(sonarDistance);

For multiple variables just separate duplicate it and separate with a comma.

Serial.print("Sonar:");

Serial.print(sonarDistance);

Serial.print(",");

Serial.print("Microphone:");

Serial.println(microphoneVolume);

Now if you open the serial monitor you can easily view both values, in the top left you can toggle which ones are visible to make it easier to read.