Serial Plotter in Arduino

From ESE205 Wiki
Revision as of 19:59, 29 April 2017 by Jkorovin (talk | contribs)
Jump to navigation Jump to search

How to use Arduino Serial Plotter:

The Arduino Serial Plotter allows you to graph serial data directly from your arduino to your laptop/computer in real time. Instead of displaying raw data via Arduino Serial Monitor, Arduino Serial Plotter allows you to display data in the form of a graph, allowing you to more accurately visualize your data (in many contexts, viewing a serial plot is much more informative than having to sort through a stream of data).

Useful aspects of plotter:

- Data display sorted by color

- Ability to plot multiple data values

- Resizes automatically

- Autoscroll enabled (similar to serial monitor)

- Great for visualization of data

- Visual troubleshooting

How to access the plotter:

After uploading your code…

Duino1.jpg
Duino2.jpg
Duino3.jpg
Duino4.jpg
Duino5.png

How the Graph works:

The vertical Y-Axis auto adjusts itself with the output value (as it increases or decreases) to encompass all the data. The plot itself (and X-axis with it) is updated every time a Serial.print() command updates with a new value to be plotted on the graph.

Important things to know: Make sure the Baud Rate of both the Serial Plotter and the code is set to the same value, otherwise the graph will not generate.

When displaying multiple values, they will be differentiated by color, with the first value (and every value from the print statement that prints it) printed by the first color, and the next the second color, etc.

Like so^

In order to plot multiple values, you need to separate print statements with a comma, as shown here. Serial.print(Value); Serial.print(","); Serial.println(Value2);

Now you know most of how it works, the only thing left is to explore it yourself!

An example from my project, FootFrame: