Maxim Integrated MAX30205 C, C++ source code driver software: MAX30205 is accurate to +-0.1°C over the range of 37.0°C to 39.0°C. One-shot, shutdown modes are available for reduced power usage. Thermostat thresholds allow for temperature hysteresis or for alarm settings. The MAX30205 is available in a compact 3x3 mm, 8-pin TDFN package. Operating supply voltage range is 2.7V to 3.3V. Typical applications are for clinical digital thermometers, thermostats with hysteresis, and temperature alarms.
Dependents: MAX30205_Human_Body_Temperature_Sensor
Revision 10:9c5dc1393570, committed 2019-04-17
- Comitter:
- phonemacro
- Date:
- Wed Apr 17 21:13:54 2019 +0000
- Parent:
- 9:d98e4a80a866
- Commit message:
- Updated comments
Changed in this revision
max30205.h | Show annotated file Show diff for this revision Revisions of this file |
max30205_cpp.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r d98e4a80a866 -r 9c5dc1393570 max30205.h --- a/max30205.h Mon Apr 15 21:18:33 2019 +0000 +++ b/max30205.h Wed Apr 17 21:13:54 2019 +0000 @@ -109,28 +109,6 @@ #define MAX30205_I2C_SLAVE_ADR_30 (0xAA >> 1) /* VDD SDA SCL */ #define MAX30205_I2C_SLAVE_ADR_31 (0xA8 >> 1) /* VDD SDA SDA */ - -#define MAX31726_I2C_SLAVE_ADR_00 (0x98 >> 1) /* GND GND */ -#define MAX31726_I2C_SLAVE_ADR_01 (0x9A >> 1) /* GND VDD */ -#define MAX31726_I2C_SLAVE_ADR_02 (0x8A >> 1) /* GND SCL */ -#define MAX31726_I2C_SLAVE_ADR_03 (0x88 >> 1) /* GND SDA */ -#define MAX31726_I2C_SLAVE_ADR_04 (0x9C >> 1) /* VDD GND */ - -#define MAX31726_I2C_SLAVE_ADR_05 (0x9E >> 1) /* VDD VDD */ -#define MAX31726_I2C_SLAVE_ADR_06 (0x8E >> 1) /* VDD SCL */ -#define MAX31726_I2C_SLAVE_ADR_07 (0x8C >> 1) /* VDD SDA */ -#define MAX31726_I2C_SLAVE_ADR_08 (0xBC >> 1) /* SCL GND */ -#define MAX31726_I2C_SLAVE_ADR_09 (0xBE >> 1) /* SCL VDD */ - -#define MAX31726_I2C_SLAVE_ADR_10 (0xAE >> 1) /* SCL SCL */ -#define MAX31726_I2C_SLAVE_ADR_11 (0xAC >> 1) /* SCL SDA */ -#define MAX31726_I2C_SLAVE_ADR_12 (0xB8 >> 1) /* SDA GND */ -#define MAX31726_I2C_SLAVE_ADR_13 (0xBA >> 1) /* SDA VDD */ -#define MAX31726_I2C_SLAVE_ADR_14 (0xAA >> 1) /* SDA SCL */ - -#define MAX31726_I2C_SLAVE_ADR_15 (0xA8 >> 1) /* SDA SDA */ - - #define MAX30205_CF_LSB (0.00390625F) /** @union max30205_raw_data
diff -r d98e4a80a866 -r 9c5dc1393570 max30205_cpp.h --- a/max30205_cpp.h Mon Apr 15 21:18:33 2019 +0000 +++ b/max30205_cpp.h Wed Apr 17 21:13:54 2019 +0000 @@ -41,36 +41,53 @@ * @brief Digital thermometer, thermostat, temperature sensor. * @version 1.0001.0000 * - * @details The MAX30205, MAX31726 temperature sensors - * provides accurate temperature measurements. - * Extended format allows for high temperature readings up to 150°C. + * @details The MAX30205 temperature sensors + * provides accurate temperature measurements of +-0.1°C + * over the range of 37°C to 39°C (98.6°F to 102.2°F) * The MAX30205 can operate in a low powered mode by utilizing * the shutdown and one-shot mode. * 8-pin TQDFN 3x3 mm package - * Accuracy is +-0.5°C from -40°C to +105°C (-40°F to +221°). - * Operating temperature: -55°C to +150°C (-67°F to +302°). - * VDD: 2.5V to 3.7V. + * Operating temperature: 0°C to 50°C (+32°F to +122°). + * VDD: 2.7V to 3.7V. * * @code * #include "mbed.h" * #include "max32630fthr.h" * #include "max30205.h" + * #include "max30205_cpp.h" + * #include "max30205_c.h" * #include "USBSerial.h" + * Serial pc(USBTX, USBRX); // Use USB debug probe for serial link + * Serial uart(P2_1, P2_0); + * void wait_sec_prompt(uint8_t time) + * { + * // Ports and serial connections + * uint32_t i; + * for (i = 0; i < time; i++) { + * pc.printf("."); + * wait(1); + * } + * pc.printf("\r\n"); + * } * MAX32630FTHR pegasus(MAX32630FTHR::VIO_3V3); - * I2C i2cBus(P3_4, P3_5); + * DigitalOut rLED(LED1); + * DigitalOut gLED(LED2); + * DigitalOut bLED(LED3); + * I2C i2cBus(P3_4, P3_5) * int main() * { + * uint8_t i2c_addr = MAX30205_I2C_SLAVE_ADR_00; * float temperature; * DigitalOut rLED(LED1, LED_OFF); * DigitalOut gLED(LED2, LED_OFF); * DigitalOut bLED(LED3, LED_OFF); * gLED = LED_ON; - * MAX30205 temp_sensor(i2cBus, MAX30205_I2C_SLAVE_ADR_00); + * MAX30205 temp_sensor(i2cBus, i2c_addr); * i2cBus.frequency(400000); - * temperature = - * temp_sensor.read_reg_as_temperature(MAX30205_REG_TEMPERATURE); - * printf("Temperature = %3.4f Celsius, %3.4f Fahrenheit\r\n", - * temperature, temp_sensor.celsius_to_fahrenheit(temperature)); + * temperature = + * temp_sensor.read_reg_as_temperature(MAX30205_REG_TEMPERATURE); + * pc.printf("Temperature = %3.4f Celsius, %3.4f Fahrenheit\r\n", + * temperature, temp_sensor.celsius_to_fahrenheit(temperature)); * } * @endcode */ @@ -182,4 +199,4 @@ }; -#endif/* DS1775_CPP_H */ \ No newline at end of file +#endif/* MAX30205_CPP */ \ No newline at end of file