For my system I would like to record constantly, which independently I can do. Additionally, I need to be constantly reading some sensors (using SPI), which independently I can also do.
My present problem is combining the two tasks. I need to record all the time, but also read the sensors 10-50 times per second.
Using picamera and camera.start_recording() is usually followed by a sleep() delay. Here are the solutions I plan to explore, but was hoping for some pointers and guidance before diving into each for several hours.
Since I essentially need to record from start to stop of the program, which runs several hours, I was thinking of placing all my sensor reading functions after the .start_recording(), allowing the program only to stop_recording() after my final test conditions have been met (per sensor information).
I could try running two python programs, one recording and one sensing. I believe this would require multi-threading? Or multiprocessing?
Please share your thoughts, and suggestions of other approaches to this problem.