Melexis MLX90614 library
Dependents: IR_temperature IR_temperature IR_temperature UserIntefaceLCD ... more
MLX90614 Class Reference
An Interface for MLX90614. More...
#include <mlx90614.h>
Public Member Functions | |
MLX90614 (I2C *i2c, int addr=0xB4) | |
Create MLX90614 interface, initialize with selected I2C port and address. | |
bool | getTemp (float *temp_val) |
Get Temperature data from MLX90614. |
Detailed Description
An Interface for MLX90614.
//Print temperature data #include "mbed.h" #include "mlx90614.h" I2C i2c(p28,p27); //sda,scl MLX90614 thermometer(&i2c); float temp; void main(void){ if(thermometer.getTemp(&temp)){ printf("Temperature : %f \r\n",temp); } wait(0.5); }
Definition at line 38 of file mlx90614.h.
Constructor & Destructor Documentation
MLX90614 | ( | I2C * | i2c, |
int | addr = 0xB4 |
||
) |
Create MLX90614 interface, initialize with selected I2C port and address.
- Parameters:
-
i2c I2C device pointer addr Device address(default=0xB4)
Definition at line 7 of file mlx90614.cpp.
Member Function Documentation
bool getTemp | ( | float * | temp_val ) |
Get Temperature data from MLX90614.
- Parameters:
-
temp_val return valiable pointer
- Returns:
- 0 on success (ack), or non-0 on failure (nack)
Definition at line 15 of file mlx90614.cpp.
Generated on Sun Jul 17 2022 03:44:29 by
