Skip to content

Installation and Quickstart

Devin A. Conley edited this page Sep 25, 2021 · 9 revisions

Installation:

Install Plotter library

Search for Plotter in the Arduino Library Manager.

or

Install manually with the ZIP file of Plotter.


Setup Listener

Download one of the following stand-alone listener options. Keep the folder intact so the application can access the library and source folders. (Java Runtime Environment 8 required)

or

Download the source directory from this repository ( listener/ ) and run that with the Processing IDE.


Quickstart:

Usage in Arduino code

Include library

#include "Plotter.h"

Declare global variables. Any variable that you want plotted should have global scope. You will also want the Plotter object to be accessible globally.

double x;

Plotter p;

Start the Plotter and add graphs as desired. When adding graphs, the first argument is a String with the title of the graph and the second argument is an int with the number of points displayed at any given time. These two arguments are followed by a String and your corresponding variable.

void setup()
{
  p.Begin(); // start plotter
  
  p.AddTimeGraph( "Some title of a graph", 500, "label for x", x );
}

Update variables as you normally would and call plot whenever you are ready. This example simply assigns arbitrary sine data.

void loop()
{
  x = 10*sin( 2.0*PI*( millis() / 5000.0 ) );

  p.Plot(); // usually called within loop()
}

Using the Listener

Once the Arduino is running, start the listener application that you setup above.

Start Listener Image

The application will configure itself and your data should be plotted appropriately.

Quick Start Results Image