Quote from: spiney on May 23, 2013, 06:38 pmI want to record 2 data sets on the SD card, one initiated by a regular alarm and the other by an interrupt.So I would like to use an IF statement to close a file (if it is open) sI do not see why you need to complicate things by using an IF. You can use the approach that files are normally closed, i.e. open/write/close, do something else.