Updated i2c interface to work correctly with mBed and Hexiwear
Dependents: Hexi_Click_IRThermo_Example
Fork of MLX90614 by
MLX90614 Class Reference
An Interface for MLX90614. More...
#include <mlx90614.h>
Public Member Functions | |
MLX90614 (I2C *i2c, uint8_t 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 35 of file mlx90614.h.
Constructor & Destructor Documentation
MLX90614 | ( | I2C * | i2c, |
uint8_t | 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 13 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 21 of file mlx90614.cpp.
Generated on Fri Jul 15 2022 02:23:28 by 1.7.2