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:
- 4:ca90e528fe79
- Parent:
- 3:597971685e65
--- a/main.cpp Thu Apr 11 07:10:00 2019 +0000 +++ b/main.cpp Thu Apr 11 21:26:11 2019 +0000 @@ -87,7 +87,7 @@ pc.printf("MAX31725 Digital Thermometer and " "Thermostat example source code.\r\n"); pc.printf("\r\n"); - uint8_t i2c_addr = MAX31725_I2C_SLAVE_ADR_00; + 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, @@ -173,9 +173,6 @@ MAX31725_CFG_NORMAL_FORMAT | MAX31725_CFG_FAULT_FILTER_6 | MAX31725_CFG_OS_POLARITY_ACT_LOW | MAX31725_CFG_COMPARATOR_MODE | MAX31725_CFG_CONTINUOUS), i2cBus); - /* Configure for 9 bit resolution, fault filter 1, - active low, comparator, continuous, - */ for (i = 0; i < 10; i++) { wait(MAX31725_WAIT_CONV_TIME); temperature = max31725_read_reg_as_temperature(MAX31725_REG_TEMPERATURE,