License: BSD 3-Clause

Precision I²C temperature sensor. Arduino library for the MCP9808 sensor (https://learn.adafruit.com/adafruit-mcp9808-precision-i2c-temperature-sensor-guide). Wraps https://github.com/adafruit/Adafruit_MCP9808_Library. Device datasheet: https://cdn-shop.adafruit.com/datasheets/MCP9808.pdf
Convert from Celsius to Fahrenheit.
Get resolution mode of device. MCP9808 has four resolution modes (resolution and sample time in parentheses): 00h ( 0.5°C , 30 ms); 01h (0.25°C, 65 ms); 02h (0.125°C, 130 ms); 03h (0.0625°C, 250 ms).
Create mcp9808 device.
Read temperature in degrees Celsius. Temperature can be converted to Fahrenheit scale using celsius-to-fahrenheit node.
Set resolution mode of MCP9808 device. Four modes are available (resolution and sample time in parentheses): 00h ( 0.5°C , 30 ms); 01h (0.25°C, 65 ms); 02h (0.125°C, 130 ms); 03h (0.0625°C, 250 ms).
Shutdown MCP9808 device. Stops temperature sampling and reduces power consumption of MCP9808 device to ~0.1 microampere.
Wake up MCP9808 and start temperature sampling. Power consumption when sampling is ~200 microampere.
Demonstration of how to change the resolution mode of the MCP9808. Here the resolution mode is changed from 03h (0.0625°C) to 01h ( 0.5°C). Run this patch in the debugger.
Patch to demonstrate sending temperature reading to a text LCD.
Patch to demonstrate how to maximize sampling rate for a given resolution, by not switching off MCP9808 between reads. Run this patch in debugger.
Combines low level nodes to create a simple to use thermometer. Outputs temperature in °C (can be converted to °F using celsius-to-fahrenheit node). To conserve energy the MCP9808 is put into sleep mode between temperature readings. You can maximize sampling rate by not switching off MCP9808 between reads (see example-max-sample-rate).
Patch to test thermometer. Run this patch in debugger.
To use the nodes in your project you should have the wayland/mcp9808-thermometer library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.