README.rst
1.. zephyr:code-sample:: icm42605
2 :name: MPU6050 Invensense Motion Tracking Device
3 :relevant-api: sensor_interface
4
5 Get temperature, acceleration, and angular velocity from an ICM42605 sensor (polling & trigger
6 mode).
7
8Description
9***********
10
11This sample application periodically (10 Hz) measures the sensor
12temperature, acceleration, and angular velocity, tap, double tap
13displaying the values on the console along with a timestamp since
14startup.
15
16Wiring
17*******
18
19This sample uses an external breakout for the sensor. A devicetree
20overlay must be provided to identify the SPI bus and GPIO used to
21control the sensor.
22
23Building and Running
24********************
25
26After providing a devicetree overlay that specifies the sensor location,
27build this sample app using:
28
29.. zephyr-app-commands::
30 :zephyr-app: samples/sensor/icm42605
31 :board: nrf52dk/nrf52832
32 :goals: build flash
33
34Sample Output
35=============
36
37.. code-block:: console
38
39 *** Booting Zephyr OS build zephyr-v2.1.0-576-g4b38659b0661 ***
40 [0:00:00.008]:23.6359 Cel
41 accel -5.882554 -6.485893 5.868188 m/s/s
42 gyro 0.014522 0.002264 -0.036905 rad/s
43 [0:00:02.020]:23.6359 Cel
44 accel -5.841853 -6.435615 5.911283 m/s/s
45 gyro 0.017852 0.001199 -0.034640 rad/s
46 [0:00:04.032]:23.6829 Cel
47 accel -5.930438 -6.461951 6.009446 m/s/s
48 gyro 0.012923 0.002131 -0.037171 rad/s
49 [0:00:06.044]:23.6359 Cel
50 accel -5.884948 -6.524200 5.961562 m/s/s
51 gyro 0.012390 -0.001732 -0.045964 rad/s
52 [0:00:08.056]:35.7712 Cel
53 accel -5.863400 -12.872426 -0.154427 m/s/s
54 gyro -0.034373 -0.034373 -0.034373 rad/s
55 [0:00:10.068]:23.6829 Cel
56 accel -5.906496 -6.461951 5.899312 m/s/s
57 gyro 0.015321 -0.000399 -0.039169 rad/s
58
59<repeats endlessly>
60