SixPotatoe Logging

SixPotatoe can log events so that the log can be examined at a later point. Most people will have no need to do this, but for those wish to understand the dynamics of SixPotatoe’s operation, this is a good way to view its operation.

There is a method for adding entries to the log:

addLog(float a, float b, float c, float d)

This method simply puts four floating point numbers into the log. The most straightforward way to do this is to place the line in the postLog() method in the run.ino file. The following line is already in the method:

addLog(imu.gHeading, currentLoc.x, currentLoc.y, 0.0);

This will add these values to the log file, in this case, whenever a route is in progress. To read these values back, take the following actions:

  1. Bring up the Serial monitor.
  2. Type a “d” and hit return. The log will be dumped to the serial monitor.
  3. Type a “Control a” to select the entire output.
  4. Type a “Control c” to copy the entire buffer.
  5. Open a text editor.
  6. In the text editor, copy the entire buffer into the editor. Usually this is a “Control v”.
  7. In the text editor, save the file as a “.csv” file. So, for example you could save the file as something like: “route.csv”.
  8. Open this file in spreadsheet program to examine and graph the data.

If, for example, you were to run the program with the above addLog() line. You would see the x and y coordinates in the second and third column. You could then plot these values in a scatter gram, which would result in an accurate representation of the route.