1.. _bmm150:
2
3BMM150 Geomagnetic Sensor
4#########################
5
6Overview
7********
8
9This sample application periodically reads magnetometer (X, Y, Z) data from
10the first available device that implements SENSOR_CHAN_MAGN_* (predefined array
11of device names). This sample checks the sensor in polling mode (without
12interrupt trigger).
13
14Building and Running
15********************
16
17This sample application uses an BMM150 sensor connected to a board via I2C.
18Sensor has multiple pins so you need to connect according to connection diagram given in
19`bmm150 datasheet`_ at page 41.
20
21.. code-block:: console
22
23.. zephyr-app-commands::
24   :zephyr-app: samples/sensor/bmm150
25   :board: nrf52840dk_nrf52840
26   :goals: flash
27   :compact:
28
29Sample Output
30=============
31To check output of this sample , any serial console program can be used.
32Here I am using picocom program to open output. Check which tty device it is.
33In my case it is ttyACM0
34
35.. code-block:: console
36
37        $ sudo picocom -D /dev/ttyACM0
38
39.. code-block:: console
40
41        ( x y z ) = ( -0.390625  0.087500  -0.390625 )
42        ( x y z ) = ( -0.275000  0.115625  -0.275000 )
43        ( x y z ) = ( -0.281250  0.125000  -0.281250 )
44        ( x y z ) = ( -0.287500  0.134375  -0.287500 )
45
46.. _bmm150 datasheet: http://www.mouser.com/ds/2/783/BST-BMM150-DS001-01-786480.pdf
47