zephyr/samples/sensor/bmm150
David B. Kinder ee71332b99 doc: fix doc misspellings
Found some spelling issues missed during regular PR review

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-10-17 14:31:52 -04:00
..
src samples: bmm150: Add sample application for BMM150 sensor 2017-09-05 07:56:41 -04:00
Makefile samples: bmm150: Add sample application for BMM150 sensor 2017-09-05 07:56:41 -04:00
prj.conf samples: bmm150: Add sample application for BMM150 sensor 2017-09-05 07:56:41 -04:00
README.rst doc: fix doc misspellings 2017-10-17 14:31:52 -04:00
sample.yaml tests: samples: fix yaml syntax 2017-10-15 08:15:00 -04:00

.. _bmm150:

BMM150 Geomagnetic Sensor
#########################

Overview
********

This sample application periodically reads magnetometer (X, Y, Z) data from
the first available device that implements SENSOR_CHAN_MAGN_* (predefined array
of device names). This sample checks the sensor in polling mode (without
interrupt trigger).

Building and Running
********************

This sample application uses an BMM150 sensor connected to an Arduino 101 board via I2C.
Sensor has multiple pins so you need to connect according to connection diagram given in
`bmm150 datasheet`_ at page 41.
There are two processor cores (x86 and ARC) on the Arduino 101. You will need to
flash both this sample's code on the ARC core (using the ``arduino101_ss`` board target),
and stub code on the x86 core (using the ``arduino_101`` board target), as shown below.

.. code-block:: console

        $ cd $ZEPHYR_BASE/samples/sensor/bmm150
        $ make BOARD=arduino_101_sss flash

        $ cd $ZEPHYR_BASE/tests/booting/stub
        $ make BOARD=arduino_101 flash

Sample Output
=============
To check output of this sample , any serial console program can be used.
Here I am using picocom program to open output. Check which tty device it is.
In my case it is ttyUSB0

.. code-block:: console

        $ sudo picocom -D /dev/ttyUSB0

.. code-block:: console

        ( x y z ) = ( -0.390625  0.087500  -0.390625 )
        ( x y z ) = ( -0.275000  0.115625  -0.275000 )
        ( x y z ) = ( -0.281250  0.125000  -0.281250 )
        ( x y z ) = ( -0.287500  0.134375  -0.287500 )

.. _bmm150 datasheet: http://www.mouser.com/ds/2/783/BST-BMM150-DS001-01-786480.pdf