Sep-27-2018, 06:10 AM
(Sep-26-2018, 04:42 PM)ikejima Wrote: unknowntothem,
Yes, when the second loop is complete and the adcx sensor is below 840, the first 'while' will continue to run and it will open the file again and write for 5 seconds.
When the second loop is complete and adcx sensor is greater than 840, the first 'while' stopped.
Do you want to log only the last 5 seconds of sensor until its value is 840 ?
Hi Ikejima,
I would like to log only 5 seconds of data in total, during the five second loop somewhere in the middle the raw data will exceed 840 for less than 0.01 seconds and generate a overblast pressure graph then return to a value below 840. The issue is that once this happens I need the program to stop recording these 5 second loops, saving the whole graph in the .csv file, so I can't stop the loop the moment that the value exceeds 840, I need to see the following 0.01 seconds of data also.
Thanks for all the info so far, I really feel like this is a noob question, I've gotten this far learning python online but can't quite figure out this last bit.