Exporting RPM data to txt or csv file

Hey there o/

I was wondering if yall had any information on how I could write to a text file the velocity of the motor over time. Is there any vex built functions or capabilities to accomplish this or does it need to be done custom? Any help yall could give would be much appreciated.

Here is what I have tried. I have tried printing all of the values to the terminal to copy and paste , however there seems to be a cap to the number of characters that you can print out because it “stalls” in the middle of the print task. Also, I have tried using the std::ofstream function but anything I have tried has not successfully opened. Below is an example of the code that I ran which was not able to create and open the file.

  if (myfile.is_open()) { // check if the file is open
    myfile << "This is a new file!" << std::endl; // write to the file
    myfile.close(); // close the file
  } else {
    std::cerr << "Unable to open file" << std::endl; // handle file opening error
  }

Thanks so much for your help and have a fantastic day!

Until next time o7
–Josh

Have a look at this reply to a previous post, I think it might answer your question.

Hello, where are you attempting to store the file. Since the code is running on the brain, when you save a file it will be saved to an SD card you have inserted in your brain. If there is no SD card in your brain, nothing will be stored.

On another note, if you need help logging the motors velocity data and putting it in the csv, let me know!