-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
37 lines (24 loc) · 1.39 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
This code is mostly
Copyright (c) 2012 Jeff Rowberg, and copied from
https://github.com/jrowberg/i2cdevlib
I have simply hacked it to work with the RaspberryPi, using the in-kernel
I2C drivers. It should be trival to make use of any of the other sensors
Jeff supports in this way.
You need libgtkmm-3.0-dev installed in order to build the 3d demo.
NOTE: If you have a revision 2 Raspberry Pi you need to edit I2Cdev.cpp
and change all references to "/dev/i2c-0" to read "/dev/i2c-1".
'make' will create three demos:
demo_raw - displays raw gyro and accel values.
demo_dmp - displays yaw, pitch and roll angles, etc, using the DMP. See the
source to enable different output data.
demo_3d - displays a wireframe 'model' on the screen which you can rotate
on all three axes by moving the MPU6050.
The demo_3d code is mostly mine, not Jeff's, and is a pretty ugly mix of C and
C++, but it works well enough for a demo.
To make the most of this code you need to get an MPU6050 and hook it up
to the I2C interface on your Pi. You can "make test_3d" if you just want
to play with the wireframe model without an MPU6050.
Note the DMP FIFO rate has been set to 20Hz in the Makefile; it is 100Hz in the
original code, but that was a bit fast for the 3d demo. See the comments in
MPU6050_6Axis_MotionApps20.h file to change the rate.
Richard Hirst <[email protected]> 06 Nov 2012