Usb logging

Hey everyone, I was wondering how to actually log information onto a usb flash drive while it is plugged into a roborio. For example: when the robot is in auto, it should log onto the flashdrive, “Entering Auto.”

https://team2869.org/Log.html
Here’s the code I used to log to the rio, but since it’s just a linux system, all you need to do is change

/home/lvuser/Logs/log

to

/media/somename/flashdrivename/log

somename is just a username, I’m not sure what it will be but if you just plug in the flash drive just look through /media and you should be able to find it

Have you considered using Shuffleboard's built in event marking and logging functionalities?

From https://www.ni.com/pdf/manuals/374474a.pdf -

image

That appears to be for labview while I was talking about java. It might still act like that, but I haven’t tried with a usb because I didn’t need to

This is not specifically LabVIEW. We log directly to /u/ in Java if the directory exists (i.e. the drive is plugged in).

I concur, should work in all languages

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.