Data Capture and Graphing

I am trying to gather sensor data from the Arduino, connected to my Mac OS X via a USB A-B cable. I am using a modified version of the "Nunchuck_Print" Sketch to gather the X-Axis data. I would like to graph the information.

I have tried using this method posted on Tom Igoe's site:
http://www.tigoe.net/pcomp/code/category/arduinowiring/140

The instructions in the above link direct the user to capture the data using the "screen" function in the Terminal, and then convert the data to a .csv file (comma separated value) file and then import the data to the native OS X graphing program, "Grapher."

But, the data that I collect is just a bunch of seemingly random characters...I am assuming that they are not random, (they are likely ASCII equivalents of some sort) but I do not know how to interpret or convert them into a format suitable for graphing.

Does anyone know how to capture live sensor data in a graph friendly manner? This is a simple operation, but one that has stumped my Newbie Brain! :-?

AHA!! I answered my own question...

zTerm, a free software program for the Mac.

http://homepage.mac.com/dalverson/zterm/

Once you've installed the driver software for the USB-Serial that is bundled with the Arduino UI, zTerm lists the USB Port connected to the Arduino as one of the possible Serial Ports in the Settings>Modem Preferences... panel. Choose it!

Once you've chosen the correct Serial Port, go to Settings>Connection...
and make sure that the Data Rate is the same as the Serial.begin() data rate in your sketch and in the Arduino UI.

Make sure that the Flow Control Xon/Xoff box is also checked.

The last thing is to use the three lines of code(or some variation of them) mentioned in this link:

http://www.tigoe.net/pcomp/code/category/arduinowiring/140

in order to have the data sent in CSV format (comma separated value).

Then you can use the data to graph the changes in readings over time with the native OS X graphing application "Grapher" that is found in the Applications>Utilities folder.

Follow the instructions given in the link above, with the important exceptions below.

Make sure that you DO NOT change the file extension to .csv!
Use the .txt extension, otherwise Grapher will not recognize the file
AND make sure to check the box in the Import Dialog Panel that says "Use Special Column Separator."

And then zoom out until your data appears at whatever scale is appropriate to your graph size.

:wink: