README.rst
1.. _zscilib-orientation-hw-sample:
2
3Orientation Hardware Test
4#########################
5
6Overview
7********
8
9This sample allows testing the orientation API with real hardware, using
10Zephyr's sensor API to access live sensor data.
11
12It has been tested with the ``frdm_k64f`` target using an external
13**FXOS8700CB** 3-axis accelerometer and magnetometer, and an **FXAS21002C**
143-axis gyroscope. See the DTS overlay file for I2C addresses used, or to modify
15them to use other values depending on the sensor breakout board(s) being used.
16
17Requirements
18************
19
20If you are using a different board and sensor combination than the
21``frdm_k64f`` and an external FXOS8700CB and FXAS21002C, you will
22need to add a custom board config and device tree overlay to the ``boards``
23folder. Follow the existing example for the frdm_k64f.
24
25Building and Running
26********************
27
28To run the sample on the ``frdm_k64f``, run the following commands:
29
30.. code-block:: console
31
32 $ west build -p auto -b frdm_k64f samples/orientation/hwtester
33 $ west flash
34
35Then open up the serial port, using a tool like ``minicom``:
36
37.. code-block:: console
38
39 $ minicom -D /dev/tty.usbmodem14302
40
41To quit minicom, press ESC+x
42
43Sample Output
44*************
45
46The sample will output the following text:
47
48.. code-block:: console
49
50 ***** Booting Zephyr OS zephyr-v1.14.0-39-ge03905354671 *****
51 ns, ax, ay, az, mx, my, mz, gz, gy, gz, temp_c
52 161, 0.819, 0.716, 9.634, 0.000, 0.000, 0.000, 0.042, 0.086, 0.008, 23.04
53 171, 0.819, 0.716, 9.634, 0.000, 0.000, 0.000, 0.043, 0.087, 0.008, 23.04
54