upm  1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
Public Member Functions

API for the MLX90614 Temperature Sensor. More...

Detailed Description

This module defines the MLX90614 interface for libmlx90614

mlx90614.jpg
upm::MLX90614 sensor(0, DEVICE_ADDR);
while (!doWork) {
std::cout << "Object Temperature (" << sensor.readObjectTempC()
<< ") Ambient Temperature (" << sensor.readAmbientTempC() << ")" << std::endl;
upm_delay_us(1000000);
}

Public Member Functions

 MLX90614 (int bus=0, int devAddr=0x5A)
 
float readObjectTempF (int objAddr=MLX90614_TOBJ1)
 
float readAmbientTempF (void)
 
float readObjectTempC (int objAddr=MLX90614_TOBJ1)
 
float readAmbientTempC (void)
 
std::string name ()
 

Constructor & Destructor Documentation

MLX90614 ( int  bus = 0,
int  devAddr = 0x5A 
)

Instantiates an MLX90614 object

Parameters
busNumber of the used bus
devAddrAddress of the used I2C device

Member Function Documentation

float readObjectTempF ( int  objAddr = MLX90614_TOBJ1)

Reads the object temperature in Fahrenheit

Parameters
objAddrObject register for models with dual sensors Can be MLX90614_TOBJ1 (default) or MLX90614_TOBJ2
float readAmbientTempF ( void  )

Reads the ambient temperature in Fahrenheit

float readObjectTempC ( int  objAddr = MLX90614_TOBJ1)

Reads the object temperature in Celsius

Parameters
objAddrObject register for models with dual sensors Can be MLX90614_TOBJ1 (default) or MLX90614_TOBJ2
float readAmbientTempC ( void  )

Reads the ambient temperature in Celsius

std::string name ( )
inline

Returns the name of the component


The documentation for this class was generated from the following files: