Skip to content

plotter function reference

Dlloydev edited this page Feb 1, 2022 · 5 revisions

The plotter function provides some control over when and how to display results on the serial plotter.

 void plotter(float setpoint, float outputScale = 0.5, uint8_t everyNth = 5, bool average = false);
  • setpoint parameter sets the setpoint value for the plotter

  • outputScale is used to shrink or expand the output range so that can displayed without adversely affecting the y-axis auto scaling. For example, outputScale = 0.5 will vertically shrink the output trace by 50%

  • everyNth will plot every n samples, which compresses the x-axis in order to completely view the full test.

  • Theaverage parameter when set true will print the average of the input values from the buffer. When false, the instantaneous input values are used.

    Example

  • Autotune_Plotter

At power-up or reset, open the serial monitor to view running results then summary. Now you can close the serial monitor and open the serial plotter view the plot in progress.

image

Clone this wiki locally