Jump to content
I2Cdevlib Forums


  • Posts

  • Joined

  • Last visited

TheEnginerd's Achievements


Newbie (1/14)



  1. I'm using the MPU9150_raw.ino file. I've modified it so that instead of serial.print, i'm using dataFile.print from the SD.h library. The program works just fine, but I noticed my sample rate was slower than desired, something around 20 Hz. So I just commented out all the MPU read data (but leaving in the routine to read these values from the MPU) and had it write millis() to the SD card. Sure enough, I get between 18 and 25 samples per second. I'd like to achieve 100-125 samples per second from the MPU9150. I've sped I2C to 400kHz, no change. I am hypothesizing that the program itself takes 30-40 milliseconds to run, maybe because the SD.h requires the .txt file on the SD card to be opened and closed during each loop. Has anyone had success modifying the MPU9150_raw/source code/writing new code to achieve a 100+Hz sampling rate? And has anyone successfully written it to an SD card? I am using the Sparkfun microSD shield with a Class 10 microSDHC on an Arduino Uno 5V/16Mhz. Thanks.
  • Create New...