Because I'm crap at programming! The use of exit was to get the program working enough to get some results. The idea was to get the program to stop amd save the results to a txt file. I'm now trying to improve so as an OP said, stop the program and be able to start it again. The original code as stated was Jeff Rowbergs. Now I've bodged in an SD card and a push button to stop/ maybe in the future, pause the system after saving the results. As it's an 'interrupt driven system' what options do the interrupt allow?