Arduino Serial Plotter – New Tool

The latest release of the Arduino IDE 1.6.6 comes with a new tool called Serial Plotter. This tools gives you the ability to visualize your data in a plot that is updated in real time.

Before you continue reading this project, I recommend reading the following tutorials: 

How the Arduino Serial Plotter Works

The Arduino Serial Plotter is a Tool that comes pre-installed with your Arduino IDE (version 1.6.6 and above) that takes incoming serial data and displays them in a plot.

The vertical Y axis adjusts as the value of your serial data increases or decreases. The X axis has 500 points and each tick of the axis is equal to an executed Serial.println() command.

Build 25 cool Arduino projects with our course even with no prior experience DOWNLOAD »

Build 25 cool Arduino projects with our course even with no prior experience DOWNLOAD »

This means that the plot is updated every time you use the Serial.println() command with a new value .

plotter arduino

Download the Arduino IDE version 1.6.6 or above

In order to use the Serial Plotter tool you need to download the latest version of the Arduino IDE, at the time I’m writing this blog post is version 1.6.6.

Arduino with DHT11 Temperature and Humidity Sensor

To test the Serial Plotter tool I’m going to build a simple circuit that measures the temperature with the DHT11 sensor.

You need the following components to make this circuit:

You can use the preceding links or go directly to MakerAdvisor.com/tools to find all the parts for your projects at the best price!

Here’s how to connect the DHT11 to an Arduino:

humidity_schematics

Pins:

  • VCC (3V to 5V)
  • Data OUT
  • Don’t connect
  • GND

Source code

Here’s the code you need for this project:

  1. Download the DHT11 library here
  2. Unzip the DHT library
  3. Rename the extracted folder and remove the “-“. Otherwise your Arduino IDE won’t recognize your library
  4. Install the DHT11 in your Arduino IDE
  5. Restart your Arduino IDE
  6. Go to Files / Examples / DHT_SENSOR_LIB / DHT Tester
  7. Upload the code
// Example testing sketch for various DHT humidity/temperature sensors
// Written by ladyada modified by Rui Santos

#include "DHT.h"

#define DHTPIN 2     // what pin we're connected to

// Uncomment whatever type you're using!
#define DHTTYPE DHT11   // DHT 11 
//#define DHTTYPE DHT22   // DHT 22  (AM2302)
//#define DHTTYPE DHT21   // DHT 21 (AM2301)

// Initialize DHT sensor for normal 16mhz Arduino
DHT dht(DHTPIN, DHTTYPE);

void setup() {
  Serial.begin(9600); 
  Serial.println("DHTxx test!");
  dht.begin();  
}

void loop() {
  // Read temperature as Celsius
  float t = dht.readTemperature();
  
  // Check if any reads failed and exit early (to try again).
  if (isnan(t)) {
    return;
  } 

  // Prints temperature in the Arduino Plotter Tool
  Serial.println(t);

   // Wait a few seconds between measurements.
  delay(10);
}

View raw code

How to Open the Serial Plotter

Go to your Arduino IDE, select “Tools” and from the drop-down menu open “Serial Plotter” (see Figure below).

Serial plotter screenshot

Demonstration

In this project the Arduino is measuring the temperature in degree Celsius (°C) and printing those readings into the Arduino Serial Plotter as shown below.

zbzHgt

Download our Free eBooks and Resources

This tool is very limited right now and there isn’t much you can do with it at the moment, but I hope we can see new improvements and a wider range of features very soon!

I hope you found this tutorial useful.

Share this post with a friend that also likes electronics!

You can contact me by leaving a comment. If you like this post probably you might like my next ones, so please support me by subscribing my blog and my Facebook Page.

Thanks for reading,

-Rui Santos


Learn how to program and build projects with the ESP32 and ESP8266 using MicroPython firmware DOWNLOAD »

Learn how to program and build projects with the ESP32 and ESP8266 using MicroPython firmware DOWNLOAD »


Enjoyed this project? Stay updated by subscribing our weekly newsletter!

20 thoughts on “Arduino Serial Plotter – New Tool”

  1. Thanks Rui,
    I didn’t know about this new feature. I will update my ide to give it a try.
    Will come back to read more tutorials 😉
    Roger

  2. Dear rui ,
    I have x-y plotter can I use ide1.6.6 for the same?
    Also I find it difficult to adjust frq. Inmy projects .is it possible to have interface which will allow me to see it on my cell phone or the above mentioned plotter.
    Thanks in anticipation. I already have your e-book.

    • Thank you for your support!
      When you do a serial.println() it adds a tick to your x axis. You can only “control” the y axis with your value…
      No, right now this tool can only be viewed in your laptop…

  3. I am currently using IDE 1.6.5 and would like to try out the serial plot but after reading the issues being experienced with IDE 1.6.6 at forum.arduino.cc/index.php?topic=357312.0 I think I will stay with my current version.
    Thanks for your great tutorials and your excellent ebooks

    • Thank you for reading.
      Yes, a few people are experiencing errors, but you can download the Arduino IDE with the no install option and just have the software in a folder to experiment with this tool.

  4. How did you add the “comments” section to this webpage?
    What inspired you to go the “book” selling products?
    Is it working well for you?

    I’m designing an LED under the counter light, motion sensor triggered and looking for ways to bring traffic to my page. Will be using your information (yep, I bought the book), and doing some work with the ESP8266 soon. Thanks, David

    • Hi David,

      To Add comments to my website I use wordpress.org (which is an open-source software to create blogs).
      If you already have a blog, you can install this plugin: disqus.com and add a comments sections to your blog.

      I personally think you should install WordPress in your blog, because it is easier and there is a lot of information out there on that subject.

      I love to inspire people to create their own projects and I think the written medium is a great way of accomplishing that.
      Thank you for supporting my work and let me know if you have questions!
      Good luck with your project,
      Rui

  5. Good thing, and working – just test it with BME280, only one measured parameter of course. If this have 8 channels or more, different formatting styles, Axis and charts names and CSV, Excel, Matlab files format as logging it will be great.

    • Hi.
      I don’t have any tutorial about that subject.
      I’ve found this tutorial that may help you with that:
      norwegiancreations.com/2016/01/tutorial-multiple-values-in-the-arduino-ide-serial-plotter/
      Regards,
      Sara 🙂

Leave a Reply to Pedro Cancel reply

Download our Free eBooks and Resources

Get instant access to our FREE eBooks, Resources, and Exclusive Electronics Projects by entering your email address below.