This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
projects:crazyflie2:expansionboards:microsd [2017-01-25 09:49] tobias created |
projects:crazyflie2:expansionboards:microsd [2017-05-22 16:16] jan how to log data |
||
---|---|---|---|
Line 19: | Line 19: | ||
===== Filesystem ===== | ===== Filesystem ===== | ||
We use [[http:// | We use [[http:// | ||
+ | |||
+ | The FatFS module will be initialized by the micro-SD deck driver when the deck is detected. After that the API calls can be used such as f_mount, f_open, f_read, f_close etc. | ||
+ | |||
+ | ===== Data Logging ====== | ||
+ | |||
+ | Without any changes to // | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Config will be read only once on startup, therefore make sure that the µSD-Card is inserted before power up. If everything seems to be fine a µSD-task will be created and buffer space will be allocated. If malloc fails crazyflie will stuck with LED M1 and M4 glowing, otherwise data logging starts automatically after sensor calbriation. The logfiles will be enumerated in ascending | ||
+ | <code python> | ||
+ | import CF_functions as cff | ||
+ | logData = cff.decode(fileName) | ||
+ | </ | ||
+ | where fileName is a file from the µSD-Card. For convenience there is also an [[https:// | ||
+ |