1.. zephyr:code-sample:: 6dof_motion_drdy 2 :name: Generic 6DOF Motion Dataready 3 :relevant-api: sensor_interface 4 5 Get 6-Axis accelerometer and gyroscope data from a sensor (data ready interrupt mode). 6 7Overview 8******** 9 10This sample application periodically (100 Hz) measures the 6-axis IMU sensor with 11temperature, acceleration, and angular velocity, displaying the 12values on the console along with a timestamp since startup. 13Trigger options could be configured through KConfig. 14 15Wiring 16****** 17 18This sample uses an external breakout for the sensor. A devicetree 19overlay must be provided to identify the 6-axis motion sensor, the SPI or I2C bus interface and the interrupt 20sensor GPIO. 21 22Building and Running 23******************** 24 25This sample supports up to 6-Axis IMU devices. Each device needs 26to be aliased as ``6dof-motion-drdyN`` where ``N`` goes from ``0`` to ``9``. For example: 27 28.. code-block:: devicetree 29 30 / { 31 aliases { 32 6dof-motion-drdy0 = &icm42670p; 33 }; 34 }; 35 36Make sure the aliases are in devicetree, then build and run with: 37 38.. zephyr-app-commands:: 39 :zephyr-app: samples/sensor/6dof_motion_drdy 40 :board: nrf52dk/nrf52832 41 :goals: build flash 42 43Sample Output 44============= 45 46.. code-block:: console 47 48Found device "icm42670p@68", getting sensor data 49[0:00:01.716]: temp 23.00 Cel accel 0.150839 -0.140065 9.994899 m/s/s gyro -0.001597 0.005859 0.001597 rad/s 50[0:00:01.726]: temp 23.00 Cel accel 0.140065 -0.146050 9.988914 m/s/s gyro -0.002663 0.005859 0.003195 rad/s 51[0:00:01.736]: temp 23.50 Cel accel 0.146050 -0.130487 9.988914 m/s/s gyro -0.001597 0.006391 0.003195 rad/s 52[0:00:01.746]: temp 23.00 Cel accel 0.149642 -0.136473 9.990111 m/s/s gyro -0.002663 0.004261 0.002663 rad/s 53[0:00:01.756]: temp 23.00 Cel accel 0.146050 -0.136473 9.979337 m/s/s gyro -0.002130 0.005326 0.001597 rad/s 54[0:00:01.766]: temp 23.00 Cel accel 0.136473 -0.147247 9.986519 m/s/s gyro -0.001065 0.005859 0.002663 rad/s 55 56<repeats endlessly> 57