Skip to content

lib_m9800: Read temperature from Microchip MCP9800 device.

Richard Hodges edited this page Oct 23, 2018 · 1 revision

The Microchip MCP9800 is a thermometer with an I2C interface. This code uses the lib_i2c primitives.

char m9800_init(void);
short m9800_temp(void); /* Get temperature. out: 13-bit signed value, degrees C * 16 */