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.

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

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 build a home automation system and we’ll cover the following main subjects: Node-RED, Node-RED Dashboard, Raspberry Pi, ESP32, ESP8266, MQTT, and InfluxDB database DOWNLOAD »
Learn how to build a home automation system and we’ll cover the following main subjects: Node-RED, Node-RED Dashboard, Raspberry Pi, ESP32, ESP8266, MQTT, and InfluxDB database DOWNLOAD »

Enjoyed this project? Stay updated by subscribing our newsletter!

23 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

    Reply
  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.

    Reply
    • 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…

      Reply
  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

    Reply
    • 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.

      Reply
  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

    Reply
    • 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

      Reply
  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.

    Reply
    • 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 🙂

      Reply
    • The secret to plotting data from multiple sensors seems to be to print each set of samples on one line, in a format like “sensor1 name”: “sensor1 value” “sensor2 name”: “sensor2 value” etc. I used a space as a separator since I wanted the sensor values printing in vertical columns in the serial monitor. Here’s what two sets of readings from 11 DS18B20 sensors (10 UMW fakes, one genuine Maxim) look like on the serial monitor.
      0: 24.81 1: 24.81 2: 24.87 3: 24.75 4: 24.62 5: 25.19 6: 24.62 7: 24.81 8: 25.00 9: 25.00 10: 24.87
      0: 24.81 1: 24.75 2: 24.87 3: 24.75 4: 24.56 5: 25.12 6: 24.56 7: 24.87 8: 24.94 9: 24.94 10: 24.87

      Reply
  6. Hi Sara & Rui,

    Many thanks for your excellent website and having so many resources, I’ve already found out a lot of the wee things that not knowing really hold you back and could (and has) cost many hours or days searching fruitlessly online for. It’s obvious that you’ve put a lot of thought and effort into putting your guides and articles together.
    I’ll be back here often, definitely among the top few go to sites for help and reference.
    Best regards
    Bill

    Reply

Leave a Reply to Rui Santos 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.