README.rst
1.. zephyr:code-sample:: max6675
2 :name: MAX6675 K-thermocouple to digital converter
3 :relevant-api: sensor_interface
4
5 Get temperature from a MAX6675 K-thermocouple to digital converter (polling
6 mode).
7
8Overview
9********
10
11This is a sample application to read an external MAX6675
12cold-junction-compensated K-thermocouple to digital converter.
13
14Requirements
15************
16
17- MAX6675 wired to your board SPI bus
18- K-thermocouple connected to MAX6675 T+/T- inputs
19
20References
21**********
22
23 - MAX6675: https://datasheets.maximintegrated.com/en/ds/MAX6675.pdf
24
25Building and Running
26********************
27
28This sample can be built with any board that supports SPI. A sample overlay is
29provided for the NUCLEO-F030R8 board.
30
31.. zephyr-app-commands::
32 :zephyr-app: samples/sensor/max6675
33 :board: nucleo_f030r8
34 :goals: build
35 :compact:
36
37Sample Output
38=============
39
40The application will read and print sensor temperature every second. Note that
41temperature fetch will fail if the K-thermocouple is not connected. This is
42because MAX6675 is able to detect if the K-thermocouple is connected or not.
43
44.. code-block:: console
45
46 Temperature: 25.25 C
47 Temperature: 25.50 C
48
49 <repeats endlessly every second>
50