- Code cleanups (use functions, better comments)
- Use more config variables
- Drop
delta
from data output, but leave it in debug logging - Increase acceleration precision to 3 digits (configurable)
- Use
stop_us
output to better coincide with acceleration timing (I think)
- Changed accelerometer from 4G to 8G range.
- Changed acceleration output from
m/s²
toG
since it's metric/imperial agnostic. - Called
lis.read()
directly instead oflis.getEvent()
for a very small speed boost (but mostly to avoid conversion fromG
tom/s²
. - Set accelerometer to faster data rate (unsure this has an effect due to issues in the library).
- Use SDFat library to support long filenames.
- Uses a full timestamp for the output filename (e.g.
201902171830.csv
). - Set I2C speed to fast mode.
- Define the column units (e.g.
µs
,G
) in the header row to reduce disk usage. - Dropped
millis()
from output (same info provided bymicros()
). - Dropped battery voltage from output.
- Dropped acceleration range from output (inconsequential).
- Use
unsigned long
variables to reduce overhead. - Call the
unixtime()
just once at start up and usemicros()
to estimate time afterward (shaved off 30ms per loop). - Dropped the motion-detection aspect of data writing and simply write the data to the SD card every 800 loops.
- Initial check-in