Adafruit ADT7410 Library
Public Member Functions | List of all members
Adafruit_ADT7410 Class Reference

Class that stores state and functions for interacting with ADT7410 Temp Sensor. More...

#include <Adafruit_ADT7410.h>

Inheritance diagram for Adafruit_ADT7410:

Public Member Functions

 Adafruit_ADT7410 ()
 Instantiates a new ADT7410 class.
 
bool begin (uint8_t a=ADT7410_I2CADDR_DEFAULT, TwoWire *wire=&Wire)
 Setups the HW. More...
 
bool reset (void)
 Perform a soft reset. More...
 
float readTempC ()
 Reads the 16-bit temperature register and returns the Centigrade temperature as a float. More...
 
bool getEvent (sensors_event_t *event)
 Gets the most recent sensor event, Adafruit Unified Sensor format. More...
 
void getSensor (sensor_t *sensor)
 Gets the sensor_t device data, Adafruit Unified Sensor format. More...
 
adt7410Resolution getResolution ()
 Gets the current ADC resolution setting. More...
 
bool setResolution (adt7410Resolution res)
 Sets the current ADC resolution setting. More...
 

Detailed Description

Class that stores state and functions for interacting with ADT7410 Temp Sensor.

Member Function Documentation

◆ begin()

bool Adafruit_ADT7410::begin ( uint8_t  addr = ADT7410_I2CADDR_DEFAULT,
TwoWire *  wire = &Wire 
)

Setups the HW.

Parameters
addrThe I2C address, defaults to 0x48
wireThe I2C interface, pointer to a TwoWire, defaults to WIre
Returns
True if initialization was successful, otherwise false.

◆ reset()

bool Adafruit_ADT7410::reset ( void  )

Perform a soft reset.

Returns
True on success

◆ readTempC()

float Adafruit_ADT7410::readTempC ( )

Reads the 16-bit temperature register and returns the Centigrade temperature as a float.

Returns
Temperature in Centigrade.

◆ getEvent()

bool Adafruit_ADT7410::getEvent ( sensors_event_t *  event)

Gets the most recent sensor event, Adafruit Unified Sensor format.

Parameters
eventPointer to an Adafruit Unified sensor_event_t object that we'll fill in
Returns
True on successful read

◆ getSensor()

void Adafruit_ADT7410::getSensor ( sensor_t *  sensor)

Gets the sensor_t device data, Adafruit Unified Sensor format.

Parameters
sensorPointer to an Adafruit Unified sensor_t object that we'll fill in

◆ getResolution()

adt7410Resolution Adafruit_ADT7410::getResolution ( )

Gets the current ADC resolution setting.

Returns
The current ADC resolution setting.

◆ setResolution()

bool Adafruit_ADT7410::setResolution ( adt7410Resolution  res)

Sets the current ADC resolution setting.

Parameters
resThe ADC resolution to set, either ADT7410_13BIT or ADT7410_16BIT.
Returns
True on successful write otherwise false

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