Skip to content
rockybulwinkle edited this page Oct 19, 2013 · 4 revisions

Initialization

Wake up the device

The device powers up in the sleep state, so you have to clear bit 6 of register 0x6B. In the example arduino code, clearing the whole register works well enough.

Config

Low Pass Filter

The device supports low pass filtering of the output, referred to as "digital low pass filter" (DLPF) in the register map documentation. 0x1A CONFIG bits 2:0 of the CONFIG register set the low pass filter (LPF) bandwidth.

Interrupts

There is an pin on the MPU6050 that can be set to go high under certain conditions, one of which is DATA_RDY. This will allow us to ensure that when we read the acceleration data and gyroscope data, that they will all be from the same sample.

0x38 INT_ENABLE -- set to 0x01 to enable the DATA_RDY interrupt

May need to set some other bits to enable the interrupt #Reading from the device

Accelerometer

The acceleration data is 16 bits spread across two registers.

0x3B ACCEL_XOUT_H

0x3C ACCEL_XOUT_L

0x3D ACCEL_YOUT_H

0x3E ACCEL_YOUT_L

0x3F ACCEL_ZOUT_H

0x40 ACCEL_ZOUT_L

Gyroscope

The gyroscope data is 16 bits spread across two registers.

0x43 GYRO_XOUT_H

0x44 GYRO_XOUT_L

0x45 GYRO_YOUT_H

0x46 GYRO_YOUT_L

0x47 GYRO_ZOUT_H

0x48 GYRO_ZOUT_L

Clone this wiki locally