Simple tests
------------

Ensure your device works with these simple tests.

.. literalinclude:: ../examples/lis2mdl_simpletest.py
    :caption: examples/lis2mdl_simpletest.py
    :linenos:

Interrupt Example
-----------------

Example showing how to use the interrupts

.. literalinclude:: ../examples/lis2mdl_interrupt.py
    :caption: examples/lis2mdl_interrupt.py
    :linenos:

Compass Example
---------------

Example showing how to use the compass capabilities of the device

.. literalinclude:: ../examples/lis2mdl_compass.py
    :caption: examples/lis2mdl_compass.py
    :linenos:

Calibrate Test
--------------

Calibrate the magnetometer and print out the hard-iron calibrations

.. literalinclude:: ../examples/lis2mdl_calibrate.py
    :caption: examples/lis2mdl_calibrate.py
    :linenos:
