This example code shows how to interface the Raspberry Pi Pico to the MCP9808 digital temperature sensor board.
This example reads the ambient temperature value each second from the sensor and sets upper, lower and critical limits for the temperature and checks if alerts need to be raised. The CONFIG register can also be used to check for an alert if the critical temperature is surpassed.
- CMakeLists.txt
-
CMake file to incorporate the example in to the examples build tree.
- mcp9808_i2c.c
-
The example code.
Item |
Quantity |
Details |
Breadboard |
1 |
generic part |
Raspberry Pi Pico |
1 |
|
MCP9808 board |
1 |
|
M/M Jumper wires |
4 |
generic part |