Sample main.c/cpp code for the Maxim Integrated MAX31725, MAX31726 high temperature sensor with accuracy of to +-0.5°C. Hosted on the MAX32630FTHR. Typical applications are for thermometers, thermostat and over-temperature monitoring.
Dependencies: MAX31725_Accurate_Temperature_Sensor max32630fthr USBDevice
Diff: main.cpp
- Revision:
- 1:5d32aeb8387e
- Parent:
- 0:08830daf46a0
- Child:
- 2:1890f1449f7c
--- a/main.cpp Tue Apr 09 07:13:23 2019 +0000 +++ b/main.cpp Tue Apr 09 22:58:23 2019 +0000 @@ -72,8 +72,8 @@ printf("MAX31725 Digital Thermometer and " "Thermostat example source code.\r\n"); printf("\r\n"); - - MAX31725 temp_sensor(i2cBus, MAX31725_I2C_SLAVE_ADR_R7); + uint8_t i2c_addr = MAX31725_I2C_SLAVE_ADR_21; + MAX31725 temp_sensor(i2cBus, i2c_addr); i2cBus.frequency(400000); /* Configure for time out enabled, normal format, fault filter 6, active low polarity, comparator mode, continuous @@ -147,7 +147,7 @@ */ #include "max31725_c.h" printf("C implementation of the code\r\n"); - max31725_init(MAX31725_I2C_SLAVE_ADR_R7); + max31725_init(i2c_addr); /* Configure for time out enabled, normal format, fault filter 6, active low polarity, comparator mode, continuous */