I'm a bit new to working with gyros, and new to the arduino platform.
So I have a 9 dof imu I got from adafruit, see here:
It's a L3GD20h gyro on one chip, and an accelerometer/compass on another chip, connected to an arduino via I2C communication.
The specific problem I'm having is accessing the registers of the L3GD20h. The datasheet for the gyro is here:
I'm able to get data from the WHO_AM_I register at address 0fh. I can set CTRL_REG1 at address 20h. What I can't do is access the data in registers 28h - 2dh by their address.
According to the datasheet, 5.1.1:
C embedded in the L3GD20 behaves like a slave device and the following protocol
must be adhered to. After the start condition (ST) a slave address is sent, once a slave
acknowledge (SAK) has
been returned, an 8-bit sub-addr
ess is transmit
ted: the 7 LSb
represent the actual register address while the MSb enables address auto-increment. If the
MSb of the SUB field is 1, the SUB (register address) will be automatically incremented to
allow multiple data read/write.
So I get it, add a MSb of 1 to auto increment. What if I don't want to auto increment? What if I just want the data from register 28h only. What's it's address? Is it 28h or is it 0xA8?
Am I maybe just missing something in the binary/hex/dec conversions?
The code I'm using needs a bit of cleaning, but I'll post it soon. Looking for any help.