mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-03 05:21:57 +00:00
Prepend the text 'cmake_minimum_required(VERSION 3.8.2)' into the application and test build scripts. Modern versions of CMake will spam users with a deprecation warning when the toplevel CMakeLists.txt does not specify a CMake version. This is documented in bug #8355. To resolve this we include a cmake_minimum_required() line into the toplevel build scripts. Additionally, cmake_minimum_required is invoked from within boilerplate.cmake. The highest version will be enforced. This patch allows us to afterwards change CMake policy CMP000 from OLD to NEW which in turn finally rids us of the verbose warning. The extra boilerplate is considered more acceptable than the verbosity of the CMP0000 policy. Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no> |
||
---|---|---|
.. | ||
src | ||
CMakeLists.txt | ||
prj.conf | ||
README.rst | ||
sample.yaml |
.. _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