Adafruit AMG88xx Arduino Library
Classes | Public Member Functions | List of all members
Adafruit_AMG88xx Class Reference

Class that stores state and functions for interacting with AMG88xx IR sensor chips. More...

#include <Adafruit_AMG88xx.h>

Public Member Functions

bool begin (uint8_t addr=AMG88xx_ADDRESS)
 Setups the I2C interface and hardware. More...
 
void readPixels (float *buf, uint8_t size=AMG88xx_PIXEL_ARRAY_SIZE)
 Read Infrared sensor values. More...
 
float readThermistor ()
 read the onboard thermistor More...
 
void setMovingAverageMode (bool mode)
 Set the moving average mode. More...
 
void enableInterrupt ()
 enable the interrupt pin on the device.
 
void disableInterrupt ()
 disable the interrupt pin on the device
 
void setInterruptMode (uint8_t mode)
 Set the interrupt to either absolute value or difference mode. More...
 
void getInterrupt (uint8_t *buf, uint8_t size=8)
 Read the state of the triggered interrupts on the device. The full interrupt register is 8 bytes in length. More...
 
void clearInterrupt ()
 Clear any triggered interrupts.
 
void setInterruptLevels (float high, float low)
 Set the interrupt levels. The hysteresis value defaults to .95 * high. More...
 
void setInterruptLevels (float high, float low, float hysteresis)
 Set the interrupt levels. More...
 

Detailed Description

Class that stores state and functions for interacting with AMG88xx IR sensor chips.

Member Function Documentation

◆ begin()

bool Adafruit_AMG88xx::begin ( uint8_t  addr = AMG88xx_ADDRESS)

Setups the I2C interface and hardware.

Parameters
addrOptional I2C address the sensor can be found on. Default is 0x69
Returns
True if device is set up, false on any failure

◆ readPixels()

void Adafruit_AMG88xx::readPixels ( float *  buf,
uint8_t  size = AMG88xx_PIXEL_ARRAY_SIZE 
)

Read Infrared sensor values.

Parameters
bufthe array to place the pixels in
sizeOptionsl number of bytes to read (up to 64). Default is 64 bytes.
Returns
up to 64 bytes of pixel data in buf

◆ readThermistor()

float Adafruit_AMG88xx::readThermistor ( )

read the onboard thermistor

Returns
a the floating point temperature in degrees Celsius

◆ setMovingAverageMode()

void Adafruit_AMG88xx::setMovingAverageMode ( bool  mode)

Set the moving average mode.

Parameters
modeif True is passed, output will be twice the moving average

◆ setInterruptMode()

void Adafruit_AMG88xx::setInterruptMode ( uint8_t  mode)

Set the interrupt to either absolute value or difference mode.

Parameters
modepassing AMG88xx_DIFFERENCE sets the device to difference mode, AMG88xx_ABSOLUTE_VALUE sets to absolute value mode.

◆ getInterrupt()

void Adafruit_AMG88xx::getInterrupt ( uint8_t *  buf,
uint8_t  size = 8 
)

Read the state of the triggered interrupts on the device. The full interrupt register is 8 bytes in length.

Parameters
bufthe pointer to where the returned data will be stored
sizeOptional number of bytes to read. Default is 8 bytes.
Returns
up to 8 bytes of data in buf

◆ setInterruptLevels() [1/2]

void Adafruit_AMG88xx::setInterruptLevels ( float  high,
float  low 
)

Set the interrupt levels. The hysteresis value defaults to .95 * high.

Parameters
highthe value above which an interrupt will be triggered
lowthe value below which an interrupt will be triggered

◆ setInterruptLevels() [2/2]

void Adafruit_AMG88xx::setInterruptLevels ( float  high,
float  low,
float  hysteresis 
)

Set the interrupt levels.

Parameters
highthe value above which an interrupt will be triggered
lowthe value below which an interrupt will be triggered
hysteresisthe hysteresis value for interrupt detection

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