Plotting Arduino Data

From EmbeddedSand

Jump to: navigation, search
alt text

Contents

MegunoLinks Plotting Tool

One of MegunoLink's main features is the ability to plot data sent from a serial port in real time. To quickly take advantage of this download our Arduino Graphing Library here. It includes three example programs to get your going, plotting analog to digital values, plotting digital logic data, and plotting generated sinusoidal data.

Once you have programmed the Arduino with one of our examples or your own plotting code simply hit the connect button in MegunoLink. If the serial monitor is enabled you will see the plotting packets coming in. MegunoLink will intercept any of these packets that match our plotting structure and plot them on screen in real time. The current format is shown below.

{SeriesName, T, DataValue}

"SeriesName" is a text string that contains a description of the data. It will be used as a series name in the legend of the plot. T indicates the x-axis will be time (in the future more options will be supported for the x-axis value). Finally "DataValue" contains the data you want to plot.

Plotting Function

An alternative approach to the library is to create your own simple function to print data in the format our plotting tool expects. An example can be seen in the codeblock. This can be easily ported to other microcontrollers and serial devices.

  1. void sendPlotData(String seriesName, float data)
  2. {
  3.   Serial.print("{");
  4.   Serial.print(seriesName);
  5.   Serial.print(",T,");
  6.   Serial.print(data);
  7.   Serial.println("}");
  8. }

MegunoLink Plotting In Action

Check out MegunoLink's plotting/graphing features in action.


Download

Arduino Graphing Library

Download MegunoLink from the button below.

Download MegunoLink

Version: 1.0.6
Updated: 3 October 2012
Size: 1.25 KB
Update History

If you find MegunoLink useful, please consider a donation to help support future development

Like MegunoLink? Check out our technical report templates for Microsoft Word. Increases your productivity and helps give your technical writing a professional look.



Personal tools