I have a while loop that writes data to a file. The file itself is opened outside the while loop (I have a header write to the file only once but have continuous data logging). But, the information will not exit the while loop until the loop stops. Since the while loop runs until the stop button is pressed, I would like to know how I can send the data to be written to the file while the while loop continues to execute.