Use the Time Plot visualizer to send measurements from your Arduino to MegunoLink for plotting. Time, for the x-axis, can either be supplied by MegunoLink as it receives your data, or included in the message sent from the Arduino (from a real-time clock, for example).

Time plots are useful for testing new sensors such as accelerometers, temperature, force and many more. Just read the sensor, send the data to MegunoLink using functions from the TimePlot library and it will appear on screen. You can zoom, edit styles, auto-scroll and export data to the clipboard or a file.

Arduino data plotted using MegunoLink Pro TimePlot

MegunoLink Pro plots data received over the serial port from an Arduino or any microcontroller

To create a new time plot, select the time-plot visualizer from the Visualizers panel. Click the Visualize icon on the main toolbar to show the Visualizers panel.

Adding a Time Plot

Select Time Plot from the Visualizer Panel to create a new time plot visualizer in MegunoLink Pro.

The chart will automatically scroll to show the latest data when auto-scroll, on the visualizer’s tool-bar, is turned on.

Check out this instructable for a step-by-step guide to using plotting with MegunoLink Pro.

Sending Data from an Arduino

We’ve created a library for Arduino to make it easier to send data to MegunoLink for plotting. After you install the Arduino library,

  1. Add #include "MegunoLink.h" to the top of your Arduino program
  2. Create a TimePlot variable
  3. Call SendData to send data to MegunoLink Pro for plotting

This simple example sets the graph titles and sends a the current value from analog channel 0 to MegunoLink.

Channels

MegunoLink Pro plots support channels, a short text string for grouping series together. Channels let you have several plots in a project, sending different data to each.

Channel selector

The channel selector on the plot toolbar can be used to select a collection of series to display on the plot. Leave it blank to show the default channel.

Refer to the Arduino Library documentation and the message format reference for more information on setting up channels in your microcontroller.

Use the channel selector on the plot toolbar to choose which channel the plot should show. The channel selector is automatically populated with channels as they are detected.

User Interface

Plot properties and series styles can be set using buttons on the plot toolbar. Along with tools to select and remove series, zoom and pan, you can also hide or show the plot legend and toggle visibility of the summary table. The summary table lists the series which have been detected along with useful statistics including the minimum, maximum and average value received for each series.

Chart controls

All chart properties can be adjusted using the plotting toolbar.

Reference

Recent Posts

Leave a Comment

Start typing and press Enter to search