stm32f1/lib/sensor_mlx90614.h

28 lines
1.1 KiB
C

/** library to communicate with MLX90614 infra-red thermometer
* @file
* @author King Kévin <kingkevin@cuvoodoo.info>
* @copyright SPDX-License-Identifier: GPL-3.0-or-later
* @date 2020
* @note peripherals used: GPIO @ref sensor_mlx90614_gpio, I2C @ref i2c_master_i2c
* @note this library only uses the I²C interface, not the PWM output
*/
#pragma once
/** setup I²C bus to communicated with MLX90614 Infra-Red thermometer
* @param[in] slave_addr I²C slave address of MLX90614 device (least significant 7-bit, 0xff for default)
* @return if the display setup is successful, else the display is probably not on the I²C bus
* @warning only one display on the I²C bus is currently supported
* @note I²C frequency is 100 kHz
*/
bool sensor_mlx90614_setup(uint8_t slave_addr);
/** get ambient temperature of sensor
* @return ambient temperature in °C
* @note uses internal thermistor
*/
float sensor_mlx90614_temperature_ambient(void);
/** get measured object temperature
* @return object temperature in °C
* @note uses IR sensor
*/
float sensor_mlx90614_temperature_object(void);