Data Logging
To the Controller
controller.clear();
pros::delay(50);
controller.print(0, 0, "%s", "My message");To a microSD Card
void createLogFile(){
// creates a .txt log file for writing to
logFile = fopen("/usd/log.txt".c_str(), "w");
}
void logToTxt(const std::string& message){
// write a line of text to the log file
fprintf(logFile, "%s\n", message.c_str());
}
void endTxtLogging(){
// close and save the file
fclose(logFile);
}To the Brain
Contributing Teams to this Article:
Was this helpful?
