added mutex around SPI to prevent contention between SD card and accelerometer