# datalogger.py
# Logs the data from the acceleromter to a file on the SD-card
# creating objects
=
=
=
# loop
# wait for interrupt
# this reduces power consumption while waiting for switch press
# start if switch is pressed
# delay avoids detection of multiple presses
# blue LED indicates file open
= # open file on SD (SD: '/sd/', flash: '/flash/)
# until switch is pressed again
= # get time
, , = # get acceleration data
# write data to file
# end after switch is pressed again
# close file
# blue LED indicates file closed
# delay avoids detection of multiple presses