SD card logging working

I’m using SdFat (very simple, works very well). I’ve

#define SD_SPI_CONFIGURATION 1

in SdFatConfig, that is using native Teensy SPI library since I think it’ll perform better than SdFat Arduino-targeted “fast SPI” and (obviously) software implementation.

I’m using pin 14 for the clock, so I keep the control of the LED on pin 13. CS is on pin 15, and remember I’m using pin 16 (A2) to sense available voltage for the sd-card unrelated battery level monitoring part.

Log file is reopened every 10 seconds, so

  1. it flushes data
  2. if something went wrong, we have a new chance to reopen the file every 10 secs.