A few months ago, with version 1.6.6, the Arduino IDE introduced a great new feature. It is called Serial Plotter and you can find it in your Arduino IDE under the tools menu. Using the Serial Plotter we can graph the output of our Arduino project in real time.
The Serial Plotter is a software utility that takes incoming serial values over the USB and graphs them against an X/Y axis. The vertical Y axis auto adjusts as the value of the output increases or decreases. The X axis is not time, but each tick on it is equal to an executed serial println command. In simpler words, each time a Serial.println command is executed a new point is added in the graph. Unfortunately we cannot have a graph with more than 500 points but I hope that in a future version of the Arduino IDE, we will be able to have more points.
Let’s now see how we can use the Serial Plotter in our projects. In my opinion, this tool is great for debugging and visual representation of data. The graphing feature of the Serial Plotter allows you to quickly see relative changes in your data without looking at a stream of number values or copying and pasting the data to Excel or Google Sheets. In this first example I have connected a photoresistor to an analog pin of Arduino. In the Serial Plotter we can see how the voltage across the photoresistor changes along with the changes in luminosity. In order to achieve this result all we have to do, is to enter the command Serial.println(analogValue) and open the Serial Plotter. Impressive isn’t it?
Arduino Tutorial: Serial Plotter the new impressive tool of the Arduino IDE – [Link]