Storing Data Long Term

I was wondering if any other teams had experimented with long term storage of data for robot code. For example, a parameter could be changed through NetworkTables and the parameter would remain changed even after power cycles and possibly even code uploads. My team and I were thinking of using JSON files, but I was curious as to if other teams had tested / done anything similar.

NetworkTables keys can be made ‘persistent’ and they will be written to a file on the roborio and loaded with the last value when the robot code starts.

1 Like

We’ll definitely have to look into storing values with NetworkTables. Are there any examples you would suggest looking over?

No example that I’m aware of. You just need to call setPersistent on the entry you care about. I think there’s a SmartDashboard API also?

Java API (but all languages will be the same):

Writing to the robot’s file system definitely works well as you thought of. Maybe also consider using WPILib’s Preferences since it has an easy to use interface

1 Like