Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 6 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 14 of file mlx90614.cpp.
Generated on Wed Jul 27 2022 23:45:40 by
1.7.2