Hey there,
yesterday arrived my new Arduino DUE board. It´s my first Arduino/Microcontroller that I ever used so I´m not very experienced in Hardware. How ever, I also ordered a Sparkfun 9DOF sensor stick. I soldered some headers on it and connected the 3.3V sensor stick to my 3.3V , GND, SDA (20) and SCL (21) Pins on my DUE board (which also runs on 3.3V) via 30cm cables.
So I figured out how to read the values of the sensors by accessing the different registers. The problem is, that for each axis one of the two registers gives me very abrupt values. Here are some examples from my serial monitor.
!!! these are only the values from one register for each axis. The one whose bits are on the left side (not yet bit shifted).
x y z
GYRO: 254 255 0
GYRO: 255 0 255
GYRO: 255 255 255
GYRO: 3 255 255
GYRO: 0 255 252
GYRO: 254 0 1
GYRO: 250 2 251
I tried it with different data rates. The values from the right side register give me some nice heterogeneous values when I move the stick. This happens for pretty much all of the sensors on the stick. But when I add both of the register´s bits I would end up with values from 0-255 and then something around 65xxx-66xxx or something
I figured out that I could get some much better values for the accelerometer after activating the justify bit in the config register. But right now I´m not sure if these data is useful since I don´t know if this is the way to go. I mean… it´s not a default setting and it´s only available for the accelerometer.
How can this be? Is my Due maybe not suitable for this sensor? I wanted to have more calculation power for further filtering so I took the Due. Is my sensor stick maybe broken? Can this be an I2C issue?
I hope someone can help. I would be very happy!
Cheers,
Michael