Some very, very basic software to read accelerometer registers? (MPU-9250)

By bosco , 1 March 2016

Folks,

I've been trying for days and days to get sensible readings out of my MPU-9250's accelerometer registers. I've found a few open source projects on line, read through the incredibly sketchy and basic datasheets, downloaded the almost unfathomable Motion Driver software and have got absolutely nowhere. I've gone through the example in the datasheet line by line where it gives an example of setting up to interrupt on movement and get no response when I move it.

When I try and read on the fly I get -32 -32768 on X and Y axes and massively fluctuating values on Z as I move it all around.

I've tried enabling the interrupt to wake on movement and got nowhere.

I can read the whoami, write to registers and read back what I have written to them, so I must be basically interfacing to the unit correctly. The scope seems to suggest everything is fine. I have an Agilent scope that examines SPI lines and tells you what is being sent and received and that tells me whatever software I have written is sending out exactly what I believe it should be.

However, getting any sort of sensible data out of it is proving beyond me.

Does anyone have some really, really basic software or pseudo code to allow me to periodically read the registers, move the unit around and see those X,Y and Z axes values changing please? I must be missing something incredibly basic here but am blind to it.

Please don't just point me to the motion detect software download because ploughing through that has proven fruitless to me.

Many thanks!

phpbb Topic ID
33424