Maelstrom a PROS Library for SD Card Logging

maelstrom_circle

maelstrom

Hi, I am Gaston from the V5RC HS team 6104G Tempest, and I have been developing a library/template for PROS. It is used for logging errors and data to an SD Card on the brain. It was made so a team can access data and information in cases where the robot can’t be connected to a computer and makes it so that data can be accessed at a later time, even when the program has been terminated. The idea for this library started when at worlds we later discovered for some of our matches that we were having issues with some of our motors, that we didn’t figure out until much later (They were taking in too much current). Because of this, we decided to work on a library to log and access error messages after the match is over. We initially had this as functions in our code, but I realized that it wouldn’t be too difficult to make into a PROS library and share with the vex community.

Features:

  • This is what the library can log onto the SD Card
  • Error Logging:
    • Motor Over Temp
    • Motor Over Current
    • Motor Disconnected
    • H-Bridge Fault
    • H-Bridge Over Current
    • Battery low
  • Coordinate Logging
  • Custom Messages
  • Task Completion
  • Start of Program
  • Start of Auton
  • Start of Driver

Many of those features also come with a timestamp relative to when the program started. The library also auto creates files for each run, so the library is very plug and play.

Future Plans:

  • At the moment the library is at a stable release. But I plan to add other features and enhancements which can be seen under the GitHub Issues.

Where to Find:

You can find this library along with the installation instructions and documentation on GitHub:

If you find an Issue:

Feel free to ask questions or bring up an issue on here, or on GitHub.

Thank you very much

11 Likes

This is really cool!
I wanted to ask if you ever plan to have colored messages on the SD using rtf?
I had gotten colors when printing, but never on the SD card.

I’d love to see what your program prints out, I only see small screenshots.
image

I also did not see any level of errors, or modules as a suggestion.

This would be an example of what the error logfile would look like on the SD Card. The small screenshots were to show what each function could do, but they would all print out togetehr depending on which functions or used or which errors come up under auton or drive like this:

Or this for the data logfile:

Color for the text file is a great idea, and I will look into that.

Also, what do you mean by modules?

1 Like

Thank you for the screenshots!

I meant a function name, so if I wanted to log a debug value in the function getUserOption, the log handler would also have that in the logs so that you or someone else can refer to what module that was in. (Look at my screenshot, it looks like this:
[Trace] > Time: 2.222 > Module: clearScreen > Finished clearscreen

You could have something else for the module and message but that’s all it is.

I would also suggest some spacing from the time and what your printing, like using |, or >, etc.