{"id":13921,"date":"2015-11-12T14:31:15","date_gmt":"2015-11-12T14:31:15","guid":{"rendered":"http:\/\/randomnerdtutorials.com\/?p=13921"},"modified":"2020-07-30T14:21:05","modified_gmt":"2020-07-30T14:21:05","slug":"arduino-serial-plotter-new-tool","status":"publish","type":"post","link":"https:\/\/randomnerdtutorials.com\/arduino-serial-plotter-new-tool\/","title":{"rendered":"Arduino Serial Plotter &#8211; New Tool"},"content":{"rendered":"<p>The latest release of the&nbsp;Arduino IDE 1.6.6&nbsp;comes with a new tool&nbsp;called <em>Serial Plotter<\/em>. This tools gives you the ability to visualize your data&nbsp;in a plot&nbsp;that is updated in real time.<!--more--><\/p>\n<p><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-13928\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2015\/11\/featured-image.png?resize=1021%2C938&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"1021\" height=\"938\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2015\/11\/featured-image.png?w=1021&amp;quality=100&amp;strip=all&amp;ssl=1 1021w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2015\/11\/featured-image.png?resize=300%2C276&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 1021px) 100vw, 1021px\" \/><\/p>\n<p><strong>Before you continue reading this project, I recommend reading&nbsp;the following tutorials:&nbsp;<\/strong><\/p>\n<ul>\n<li><a href=\"https:\/\/randomnerdtutorials.com\/complete-guide-for-dht11dht22-humidity-and-temperature-sensor-with-arduino\/\" target=\"_blank\" rel=\"noopener noreferrer\">Complete Guide for DHT11\/DHT22 Humidity and Temperature Sensor With Arduino<\/a><\/li>\n<li><a href=\"https:\/\/randomnerdtutorials.com\/download\" target=\"_blank\" rel=\"noopener noreferrer\">Download Free Arduino eBook with 18+ Projects<\/a><\/li>\n<\/ul>\n<h2>How&nbsp;the Arduino Serial Plotter Works<\/h2>\n<p>The Arduino Serial Plotter is&nbsp;a Tool that comes pre-installed with your Arduino&nbsp;IDE (version 1.6.6 and above) that takes incoming serial data&nbsp;and displays them in a plot.<\/p>\n<p>The vertical Y axis adjusts as the value of your serial data&nbsp;increases or decreases. The X axis has&nbsp;500 points and each tick of the axis is equal to an executed <em>Serial.println()&nbsp;<\/em>command.<\/p>\n<p>This means that the&nbsp;plot is updated every time you use the <em>Serial.<span class=\"pl-c1\">println<\/span>()<\/em> command with a new value&nbsp;.<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" class=\"aligncenter wp-image-13931\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2015\/11\/plotter-arduino.png?resize=654%2C238&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"plotter arduino\" width=\"654\" height=\"238\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2015\/11\/plotter-arduino.png?w=918&amp;quality=100&amp;strip=all&amp;ssl=1 918w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2015\/11\/plotter-arduino.png?resize=300%2C109&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 654px) 100vw, 654px\" \/><\/p>\n<h3>Download the Arduino IDE version 1.6.6 or above<\/h3>\n<p>In order to use the Serial Plotter tool you need to download the latest version of the <a href=\"https:\/\/www.arduino.cc\/en\/Main\/Software\" target=\"_blank\" rel=\"noopener noreferrer\">Arduino<\/a>&nbsp;IDE, at the time I&#8217;m writing this blog post is version 1.6.6.<\/p>\n<h3>Arduino with&nbsp;DHT11 Temperature and Humidity Sensor<\/h3>\n<p>To test the Serial Plotter tool I&#8217;m going to build a simple circuit that measures the temperature with the <a href=\"https:\/\/randomnerdtutorials.com\/complete-guide-for-dht11dht22-humidity-and-temperature-sensor-with-arduino\/\" target=\"_blank\" rel=\"noopener noreferrer\">DHT11 sensor<\/a>.<\/p>\n<p>You need the following components to make this circuit:<\/p>\n<ul>\n<li><a href=\"https:\/\/makeradvisor.com\/tools\/compatible-arduino-uno-r3-board\/\" target=\"_blank\" rel=\"noopener noreferrer\">Arduino UNO<\/a>&nbsp;\u2013 read&nbsp;<a href=\"https:\/\/makeradvisor.com\/best-arduino-starter-kits\/\" target=\"_blank\" rel=\"noopener noreferrer\">Best Arduino Starter Kits<\/a><\/li>\n<li><a href=\"https:\/\/makeradvisor.com\/tools\/dht11-temperature-humidity-sensor\/\" target=\"_blank\" rel=\"noopener noreferrer\">DHT11 temperature and humidity sensor<\/a><\/li>\n<li><a href=\"https:\/\/makeradvisor.com\/tools\/mb-102-solderless-breadboard-830-points\/\" target=\"_blank\" rel=\"noopener noreferrer\">Breadboard&nbsp;<\/a><\/li>\n<li><a href=\"https:\/\/makeradvisor.com\/tools\/resistors-kits\/\" target=\"_blank\" rel=\"noopener noreferrer\">10K Resistor<\/a><img data-recalc-dims=\"1\" decoding=\"async\" class=\"aligncenter wp-image-5382\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2015\/05\/rsz_dht-11.jpg?resize=198%2C198&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"rsz_dht-11\" width=\"198\" height=\"198\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2015\/05\/rsz_dht-11.jpg?w=400&amp;quality=100&amp;strip=all&amp;ssl=1 400w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2015\/05\/rsz_dht-11.jpg?resize=150%2C150&amp;quality=100&amp;strip=all&amp;ssl=1 150w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2015\/05\/rsz_dht-11.jpg?resize=300%2C300&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 198px) 100vw, 198px\" \/><\/li>\n<\/ul>\n<p>You can use the preceding links or go directly to <a href=\"https:\/\/makeradvisor.com\/tools\/?utm_source=rnt&utm_medium=post&utm_campaign=post\" target=\"_blank\">MakerAdvisor.com\/tools<\/a> to find all the parts for your projects at the best price!<\/p><p style=\"text-align:center;\"><a href=\"https:\/\/makeradvisor.com\/tools\/?utm_source=rnt&utm_medium=post&utm_campaign=post\" target=\"_blank\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/10\/header-200.png?w=1200&#038;quality=100&#038;strip=all&#038;ssl=1\"><\/a><\/p>\n<p>Here\u2019s&nbsp;how to connect the DHT11 to an Arduino:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2015\/05\/humidity_schematics.jpg?quality=100&#038;strip=all&#038;ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5388\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2015\/05\/humidity_schematics.jpg?resize=481%2C380&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"humidity_schematics\" width=\"481\" height=\"380\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2015\/05\/humidity_schematics.jpg?w=1173&amp;quality=100&amp;strip=all&amp;ssl=1 1173w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2015\/05\/humidity_schematics.jpg?resize=300%2C237&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2015\/05\/humidity_schematics.jpg?resize=1024%2C809&amp;quality=100&amp;strip=all&amp;ssl=1 1024w\" sizes=\"(max-width: 481px) 100vw, 481px\" \/><\/a><\/p>\n<p>Pins:<\/p>\n<ul>\n<li>VCC (3V to 5V)<\/li>\n<li>Data&nbsp;OUT<\/li>\n<li>Don\u2019t connect<\/li>\n<li>GND<\/li>\n<\/ul>\n<h3>Source code<\/h3>\n<p>Here\u2019s the code you need for this project:<\/p>\n<ol>\n<li>Download the <strong><a href=\"https:\/\/github.com\/adafruit\/DHT-sensor-library\/archive\/master.zip\" target=\"_blank\" rel=\"noopener noreferrer\">DHT11 library here<\/a><\/strong><\/li>\n<li>Unzip the DHT library<\/li>\n<li>Rename the extracted folder and remove&nbsp;the \u201c-\u201c.&nbsp;Otherwise your Arduino IDE won\u2019t recognize your library<\/li>\n<li>Install the DHT11 in your Arduino IDE<\/li>\n<li>Restart your Arduino IDE<\/li>\n<li>Go to Files \/ Examples \/ DHT_SENSOR_LIB \/ DHT Tester<\/li>\n<li>Upload the code<\/li>\n<\/ol>\n<pre style=\"max-height: 40em; margin-bottom: 20px;\"><code class=\"language-c\">\/\/ Example testing sketch for various DHT humidity\/temperature sensors\n\/\/ Written by ladyada modified by Rui Santos\n\n#include &quot;DHT.h&quot;\n\n#define DHTPIN 2     \/\/ what pin we're connected to\n\n\/\/ Uncomment whatever type you're using!\n#define DHTTYPE DHT11   \/\/ DHT 11 \n\/\/#define DHTTYPE DHT22   \/\/ DHT 22  (AM2302)\n\/\/#define DHTTYPE DHT21   \/\/ DHT 21 (AM2301)\n\n\/\/ Initialize DHT sensor for normal 16mhz Arduino\nDHT dht(DHTPIN, DHTTYPE);\n\nvoid setup() {\n  Serial.begin(9600); \n  Serial.println(&quot;DHTxx test!&quot;);\n  dht.begin();  \n}\n\nvoid loop() {\n  \/\/ Read temperature as Celsius\n  float t = dht.readTemperature();\n  \n  \/\/ Check if any reads failed and exit early (to try again).\n  if (isnan(t)) {\n    return;\n  } \n\n  \/\/ Prints temperature in the Arduino Plotter Tool\n  Serial.println(t);\n\n   \/\/ Wait a few seconds between measurements.\n  delay(10);\n}\n<\/code><\/pre>\n\t<p style=\"text-align:center\"><a class=\"rntwhite\" href=\"https:\/\/github.com\/RuiSantosdotme\/Random-Nerd-Tutorials\/raw\/master\/Projects\/dht_temperature_serial_plotter.ino\" target=\"_blank\">View raw code<\/a><\/p>\n<h2>How to Open the Serial Plotter<\/h2>\n<p>Go to your Arduino IDE, select &#8220;Tools&#8221; and from the drop-down menu open &#8220;Serial Plotter&#8221; (see Figure below).<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-13929 size-full\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2015\/11\/Serial-plotter-screenshot.png?resize=462%2C282&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Serial plotter screenshot\" width=\"462\" height=\"282\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2015\/11\/Serial-plotter-screenshot.png?w=462&amp;quality=100&amp;strip=all&amp;ssl=1 462w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2015\/11\/Serial-plotter-screenshot.png?resize=300%2C183&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 462px) 100vw, 462px\" \/><\/p>\n<h2>Demonstration<\/h2>\n<p>In this project the Arduino is measuring the temperature in&nbsp;degree Celsius (\u00b0C) and printing those readings into the Arduino Serial Plotter as shown below.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2015\/11\/zbzHgt.gif?quality=100&#038;strip=all&#038;ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13926\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2015\/11\/zbzHgt.gif?resize=720%2C259&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"zbzHgt\" width=\"720\" height=\"259\"><\/a><\/p>\n<p>This tool&nbsp;is very limited right now&nbsp;and there isn&#8217;t much you can do with it at the moment, but I hope we can see new&nbsp;improvements and a wider range of features very soon!<\/p>\n<p>I hope you found this tutorial&nbsp;useful.<\/p>\n<p><strong>Share this post<\/strong> with a friend that also likes electronics!<\/p>\n<p>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 <a href=\"https:\/\/randomnerdtutorials.com\/download\">subscribing my blog<\/a> and my Facebook Page.<\/p>\n<p>Thanks for reading,<\/p>\n<p>-Rui Santos<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The latest release of the&nbsp;Arduino IDE 1.6.6&nbsp;comes with a new tool&nbsp;called Serial Plotter. This tools gives you the ability to visualize your data&nbsp;in a plot&nbsp;that is updated in real time.<\/p>\n","protected":false},"author":1,"featured_media":13928,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[303,2,245,269,264,251,10],"tags":[],"class_list":["post-13921","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-0-arduino","category-arduino","category-arduino-ide","category-guide-project","category-project","category-serial-plotter","category-a-tutorials"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2015\/11\/featured-image.png?fit=1021%2C938&quality=100&strip=all&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/13921","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/comments?post=13921"}],"version-history":[{"count":0,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/13921\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media\/13928"}],"wp:attachment":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media?parent=13921"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/categories?post=13921"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/tags?post=13921"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}