Adafruit MLX90393 Arduino Library
Public Member Functions | List of all members
Adafruit_MLX90393 Class Reference

#include <Adafruit_MLX90393.h>

Public Member Functions

 Adafruit_MLX90393 (TwoWire *wireBus=&Wire)
 
bool begin (uint8_t i2caddr=MLX90393_DEFAULT_ADDR)
 
bool setGain (enum mlx90393_gain gain)
 
bool setTrigInt (bool state)
 
enum mlx90393_gain getGain (void)
 
bool readData (float *x, float *y, float *z)
 

Detailed Description

Driver for the Adafruit SHT31-D Temperature and Humidity breakout board.

Constructor & Destructor Documentation

◆ Adafruit_MLX90393()

Adafruit_MLX90393::Adafruit_MLX90393 ( TwoWire *  wireBus = &Wire)

Instantiates a new Adafruit_MLX90393 class instance using I2C.

Parameters
wireBusTwoWire instance to use for I2C communication.

Member Function Documentation

◆ begin()

bool Adafruit_MLX90393::begin ( uint8_t  i2caddr = MLX90393_DEFAULT_ADDR)

Initialises the I2C bus, and assigns the I2C address to us.

Parameters
i2caddrThe I2C address to use for the sensor.
Returns
True if initialisation was successful, otherwise False.

◆ setGain()

bool Adafruit_MLX90393::setGain ( enum mlx90393_gain  gain)

Sets the sensor gain to the specified level.

Parameters
gainThe gain level to set.
Returns
True if the operation succeeded, otherwise false.

◆ setTrigInt()

bool Adafruit_MLX90393::setTrigInt ( bool  state)

Sets the TRIG_INT pin to the specified function.

Parameters
state'true/1' sets the pin to INT, 'false/0' to TRIG.
Returns
True if the operation succeeded, otherwise false.

◆ getGain()

enum mlx90393_gain Adafruit_MLX90393::getGain ( void  )

Gets the current sensor gain.

Returns
An enum containing the current gain level.

◆ readData()

bool Adafruit_MLX90393::readData ( float *  x,
float *  y,
float *  z 
)

Performs a single X/Y/Z conversion and returns the results.

Parameters
xPointer to where the 'x' value should be stored.
yPointer to where the 'y' value should be stored.
zPointer to where the 'z' value should be stored.
Returns
True if the operation succeeded, otherwise false.

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