hisyam fs / Mbed 2 deprecated Test_all

Dependencies:   mbed ADS1115 StepperMotor SRF05 TPA81new

Embed: (wiki syntax)

« Back to documentation index

Adafruit_AMG88xx Class Reference

Adafruit_AMG88xx Class Reference

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

#include <AMG8833.h>

Public Member Functions

 Adafruit_AMG88xx (PinName sda, PinName scl)
 Setups the I2C interface and hardware.
void readPixels (float *buf, uint8_t size=AMG88xx_PIXEL_ARRAY_SIZE)
 Read Infrared sensor values.
float readThermistor ()
 read the onboard thermistor
void setMovingAverageMode (int mode)
 Set the moving average mode.
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.
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 chars in length.
void clearInterrupt ()
 Clear any triggered interrupts.
void setInterruptLevels (float high, float low)
 Set the interrupt levels. The hysteresis value defaults to .95 * high.
void setInterruptLevels (float high, float low, float hysteresis)
 Set the interrupt levels.

Detailed Description

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

Definition at line 75 of file AMG8833.h.


Constructor & Destructor Documentation

Adafruit_AMG88xx ( PinName  mysda,
PinName  myscl 
)

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

Definition at line 12 of file AMG8833.cpp.


Member Function Documentation

void clearInterrupt (  )

Clear any triggered interrupts.

Definition at line 151 of file AMG8833.cpp.

void disableInterrupt (  )

disable the interrupt pin on the device

Definition at line 113 of file AMG8833.cpp.

void enableInterrupt (  )

enable the interrupt pin on the device.

Definition at line 102 of file AMG8833.cpp.

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 chars in length.

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

Definition at line 139 of file AMG8833.cpp.

void 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 chars to read (up to 64). Default is 64 chars.
Returns:
up to 64 chars of pixel data in buf

Definition at line 180 of file AMG8833.cpp.

float readThermistor (  )

read the onboard thermistor

Returns:
a the floating point temperature in degrees Celsius

Definition at line 163 of file AMG8833.cpp.

void 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

Definition at line 73 of file AMG8833.cpp.

void 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

Definition at line 60 of file AMG8833.cpp.

void 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.

Definition at line 125 of file AMG8833.cpp.

void setMovingAverageMode ( int  mode )

Set the moving average mode.

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

Definition at line 47 of file AMG8833.cpp.