Saving Data as a Graph.

I am trying to make a project that polls the distance from an object several times a second and can calculate velocity and acceleration of the object. I want to be able to represent the objects movement visually as well as with a table. Is there a way I can output the data to some data software such as excel. Are there any specific commands that I would need to use for this purpose?

It is totally up to what you have on the PC. The IDE does have a rudimentary plotting capability, though I have never used it.

You have three obvious choices:

  1. Use the PLX macro discussed at length in the Interfacing section of this forum. This enables you to send data direct Excel specifically, and produce live graphs.

  2. Send the data to a proper terminal programme, like RealTerm. This enables you to record data for subsequent transfer to Excel, or whatever similar.

  3. Record the data to SD card for subsequent pickup and transfer.

The other day I was looking at this, and got some references to Google Docs, where you can upload your data and have it create pretty customisible charts that you can then view in a web page or so. Maybe that's suitable for you. I didn't look into it into more detail yet.

Use Putty to log the session as a "session.csv" name file.
Ensure you ouput your data as CSV (comma seperated values) in Serial.print() from the Adruino.


Open in excel. Make pretty charts.

Use serial plot instead of serial monitor and you get a running graph if the outputs are slow. If they are fast the graph moves too quickly to be useful. In which case group the readings into groups of 500 and plot them out all at the same time ( or pad them out with zeros if there are not enough readings). Then you will see a real tine updated graph. Set the baud rate to the maximum speed at both ends.