Sensor Data Visualization(graph of some sort)

Is there any way I can take the debug values from a given sensor and turn this into a visual graph? I have heard of the concept of datalogging but I am not sure how that could work.

Putting this data into a graph can help me predict the trend of where the numbers are going so I could account for these sensors in autonomous.

Thank you,

Robert Engle

The low tech solution is to print the values, copy-paste them into a text file, save as a CSV, and open in spreadsheet ( or better yet stats/data analysis) software.

If you use RobotC, there is a built in real-time graphing solution. If you add the sensor values to the datalog, you can use the open the debugger and go to Debugger Windows > Datalog Graph to view a graph.

Another older way to do it is to log via debug stream lines and then import those into Excel or Open Office if you don’t have Excel.

Example… Use whatever variables you need to log. But be sure to log time.

writeDebugStreamLine(“L|%d|%d|%d|%d|%d",nSysTime, left_line, left_quad, 
	             line_Error, distance_Error);

Then grab the data into Excel and do text to columns. See the vertical pipes? Those are the delimiters in the text to columns. If the data did not stream correctly then you may have to clean up a few data points.

Then graph some of these columns with the time being the X axis. Make sure you do scatter plots to keep the X axis correct.