Working version with 0.25 second sampling interval writing to SD card. HOWEVER, this version can corrupt SD cards because it never properly closes the file it's writing to. So don't use this one.
This version implements a pushbutton on Arduino pin 2 (physical pin 4) to trigger an interrupt that will stop data logging, close the file, and go into an infinite loop doing nothing but sleeping with the watchdog timer.
This version uses the button on pin D2 to stop data logging and close the file (as in version 15), but now it saves 4 samples into temporary arrays before writing them to SD every second. This is an attempt to minimize the amount of time spent writing to SD by writing larger chunks of data at once instead of overy 0.25 seconds.