02-20-2025 06:25 AM
Sorry for my English... 😢
Yes, I want the time to reset to zero after the button is released (when it goes from true to false). This will be useful for viewing several CSV files so that the time count starts from 0 in each file as a starting point.
I want to integrate this part of the code into my main loop, where data collection, image viewing via AVI, etc., take place. I can send you the parts of the code that should work together, but only if you're okay with that. I would, of course, be very grateful for your help.
02-20-2025 11:56 AM
So, if I understand correctly:
Obviously, you need to create a new file name with each new recording. How should that file name be generated? Easiest would be for the user to give a root file name tag (e.g. "ABC" and the program would generate ABC000, txt, ABC001,txt, and so on, one for each recording. You also need to decide what should happen if a file with the same name already exists (overwrite? generate an error? not record? something else?).
All this would be trivially easy to implement starting with the code skeleton I already gave you. Just turn it into a proper state machine and things will fall into place.