zephyr/samples/sensor/mcp9808
Peter Bigot 6e5db350b2 coccinelle: standardize k_sleep calls with integer timeouts
Re-run with updated script to convert integer literal delay arguments to
k_sleep to use the standard timeout macros.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-10-09 08:38:10 -04:00
..
src coccinelle: standardize k_sleep calls with integer timeouts 2019-10-09 08:38:10 -04:00
CMakeLists.txt license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
README.rst doc: change UTF-8 chars to sphinx inline replaces 2017-06-16 07:35:11 -05:00
prj.conf samples: mcp9808: Fix CONFIG_MCP9808_TRIGGER_GLOBAL_THREAD assignment 2018-05-24 09:21:32 -04:00
sample.yaml samples: add test identifier 2019-03-29 17:44:11 -04:00

README.rst

.. _mcp9808-sample:

MCP9808 Temperature Sensor
##########################

Overview
********

Sample application that periodically reads temperature from the MCP9808 sensor.


Requirements
************

The MCP9808 digital temperature sensor converts temperatures between -20 |deg|
C and +100 |deg| C to a digital word with |plusminus| 0.5 |deg| C (max.)
accuracy. It is I2C compatible and
supports up to 16 devices on the bus. We do not require pullup resistors on the
data or clock signals as they are already installed on the breakout board.

The MCP9808 is available in a discrete component form but it is much easier to
use it mounted on a breakout board. We used the Adafruit breakout board.

- `MCP9808 Sensor`_

This sample uses the sensor APIs and the provided driver for the MCP9808 sensor.

Wiring
*******

The MCP9808 requires 2 wires for the I2C bus plus power and ground. The power
can be either 5V or 3.3V.

We connect the Data and clock wires to Analog ports A4 and A5 which is the I2C
pins on Arduino compatible boards.

In this hookup we are only connecting one device to one of the supported boards.
It reads the temperature and displays it on the console.


References
***********

- http://www.microchip.com/wwwproducts/en/en556182


.. _`MCP9808 Sensor`: https://www.adafruit.com/product/1782