IMU LSM9DS1 with SD Card logger


  • Newbie
  • *
    • Posts: 1
    • View Profile
Hello, I wonder if anyone successfully integrated the 9axis IMU with a SD card logger? I have been struggling to fit in the 32K code space (everything about 80% utilization crashes). The SD Card Arduino library by itself is ~47%, the RTIMU lib is 41% so I surely need more lightweight libs to make it work :( If anyone has done anything like this I would really appreciate any tips or custom libraries?

(Note: there is an older lightweight SD card lib using FAT16 only but windows wouldn't allow me to format SD Card with anything other than FAT32).

Ben Rose

  • Administrator
  • Hero Member
  • *****
    • Posts: 392
    • View Profile
Have you checked out SdFat? It may be the 'older lightweight' library you are mentioning, but now it's a bit less lightweight but fully supports FAT32 etc.

You should be able to utilize the 32K flash space fully, what typically causes crashes is too many global variables in the 2K memory. Especially when using an SD card, which often needs a 512 byte buffer.

What may make it much easier is to log the raw 9 axis data rather than the calculated fusion data, if it fits your application- then you can focus on actually logging the data.


  • Sr. Member
  • ****
    • Posts: 64
  • Still downloading...
    • View Profile
I got them to work together, but did not use a standard TinyDuino. I used the Tinyscreen+ which gives 256Kb Flash. The reason was not more memory, but rather I wanted data on display as well as logged. It allowed me to create a clear rubberized softball that tracks all flight data from throws/strikes. If you are stuck from memory size, maybe consider the Tinyscreen+.


SMF spam blocked by CleanTalk