OWGridEye Library for Arduino  version: 1.0.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
OWGridEye Class Reference

Object for interfacing to MAXREFDES131#. More...

#include <OWGridEye.h>

Public Types

enum  CmdResult { Success, OpFailure }
 OWGridEye command results. More...
 
enum  GridEyeRegister {
  POWER_CONTROL, RESET, FRAME_RATE, INT_CONTROL,
  STATUS, STATUS_CLEAR, AVERAGE = 7, INT_LEVEL_1,
  INT_LEVEL_2, INT_LEVEL_3, INT_LEVEL_4, INT_LEVEL_5,
  INT_LEVEL_6, THERMISTOR_LOW, THERMISTOR_HI, INT_1,
  INT_2, INT_3, INT_4, INT_5,
  INT_6, INT_7, INT_8, PIXEL_BASE_ADRS = 0x80
}
 AMG8833 register map. More...
 

Public Member Functions

 OWGridEye (RandomAccessRomIterator &selector)
 OWGridEye Constructor. More...
 
void setOWSwitchRomId (const RomId &romId)
 setOWSwitchRomId More...
 
RomId getOWSwitchRomId (void)
 getOWSwitchRomId More...
 
void setI2CBridgeRomId (const RomId &romId)
 setI2CBridgeRomId More...
 
RomId getI2CBridgeRomId (void)
 getI2CBridgeRomId More...
 
CmdResult disconnectGridEye (void)
 disconnectGridEye More...
 
CmdResult connectGridEye (void)
 connectGridEye More...
 
CmdResult connectOWbus (void)
 connectOWbus More...
 
CmdResult disconnectOWbus (void)
 disconnectOWbus More...
 
CmdResult gridEyeAccess (bool readWrite, GridEyeRegister regAdrs, uint8_t numBytes, uint8_t *dataBuf)
 gridEyeAccess More...
 
CmdResult gridEyeGetThermistor (int16_t &thermTemp)
 gridEyeGetThermistor More...
 
CmdResult gridEyeGetPixelTemperature (uint8_t pixelAdrs, int16_t &pixelTemp)
 gridEyeGetPixelTemperature More...
 
CmdResult gridEyeGetFrameTemperature (int16_t *frameTemp)
 gridEyeGetFrameTemperature More...
 

Static Public Attributes

static const uint8_t DS2413_FAMILY_CODE = 0x3A
 
static const uint8_t DS28E17_FAMILY_CODE = 0x19
 

Detailed Description

Object for interfacing to MAXREFDES131#.

MAXREFDES131# combines the DS28E17 1-wire to I2C bridge with the Panasonic AMG8833 GridEye sensor. The reference design also includes a DS2413 2ch open drain switch for controlling the MAX4717 dual SPDT analog switch. The DS28E17 and AMG8833 are connected to the 1-wire bus via COM2 of the MAX4717 and COM1 is used for daisy-chaining additional modules. Disconnecting the DS28E17/AMG8833 from the main 1-wire branch puts both devices to sleep and reduces current consumption from 10mA to a couple hundred uA.

Member Enumeration Documentation

OWGridEye command results.

Enumerator
Success 
OpFailure 

AMG8833 register map.

Enumerator
POWER_CONTROL 
RESET 
FRAME_RATE 
INT_CONTROL 
STATUS 
STATUS_CLEAR 
AVERAGE 
INT_LEVEL_1 
INT_LEVEL_2 
INT_LEVEL_3 
INT_LEVEL_4 
INT_LEVEL_5 
INT_LEVEL_6 
THERMISTOR_LOW 
THERMISTOR_HI 
INT_1 
INT_2 
INT_3 
INT_4 
INT_5 
INT_6 
INT_7 
INT_8 
PIXEL_BASE_ADRS 

Constructor & Destructor Documentation

OWGridEye::OWGridEye ( RandomAccessRomIterator &  selector)

OWGridEye Constructor.

setOWSwitchRomId() and setI2CBridgeRomId() must be called before any other member fxs.

Parameters
[in]selector- MultidropRomIterator object that encapsulates ROM fxs of 1-wire protocol

Member Function Documentation

OWGridEye::CmdResult OWGridEye::connectGridEye ( void  )

connectGridEye

Connects the DS28E17 and AMG883 to 1-wire bus

Returns
CmdResult - result of operation
OWGridEye::CmdResult OWGridEye::connectOWbus ( void  )

connectOWbus

Connects down stream devices on 1-wire bus

Returns
CmdResult - result of operation
OWGridEye::CmdResult OWGridEye::disconnectGridEye ( void  )

disconnectGridEye

Disconnects the DS28E17 and AMG8833 sensor putting both to sleep

Returns
CmdResult - result of operation
OWGridEye::CmdResult OWGridEye::disconnectOWbus ( void  )

disconnectOWbus

Disconnects down stream devices on 1-wire bus

Returns
CmdResult - result of operation
RomId OWGridEye::getI2CBridgeRomId ( void  )
inline

getI2CBridgeRomId

Gets the RomId of the DS28E17 for this sensor. The romId must have been set first.

Returns
RomId of the DS28E17 for this sensor
RomId OWGridEye::getOWSwitchRomId ( void  )
inline

getOWSwitchRomId

Gets the RomId of the DS2413 for this sensor. The romId must have been set first.

Returns
RomId of the DS2413 for this sensor
OWGridEye::CmdResult OWGridEye::gridEyeAccess ( bool  readWrite,
GridEyeRegister  regAdrs,
uint8_t  numBytes,
uint8_t *  dataBuf 
)

gridEyeAccess

Provides read/write access to the AMG8833

On Entry:

Parameters
[in]readWrite- Boolean flag indicating desired access
[in]regAdrs- AMG8833 register to start reading/writting from/to
[in]numBytes- Number of bytes to read/write
[in]dataBuf- Pointer to data buffer for storing data in on read, or data to be written on write

On Exit:

Parameters
[out]dataBuf- Read data on read operation
Returns
CmdResult - result of operation
OWGridEye::CmdResult OWGridEye::gridEyeGetFrameTemperature ( int16_t *  frameTemp)

gridEyeGetFrameTemperature

Gets pixel frame(64 pixels) temperature

On Entry:

Parameters
[in]frameTemp- buffer to hold data

On Exit:

Parameters
[out]frameTemp- pixel data
Returns
CmdResult - result of operation
OWGridEye::CmdResult OWGridEye::gridEyeGetPixelTemperature ( uint8_t  pixelAdrs,
int16_t &  pixelTemp 
)

gridEyeGetPixelTemperature

Gets individual pixel temperature

On Entry:

Parameters
[in]pixelAdrs- address of pixel to read
[in]pixelTemp- reference to int16_t var that will be overwritten with thermistor data

On Exit:

Parameters
[out]pixelTemp- pixel data
Returns
CmdResult - result of operation
OWGridEye::CmdResult OWGridEye::gridEyeGetThermistor ( int16_t &  thermTemp)

gridEyeGetThermistor

Gets internal thermistor temperature

On Entry:

Parameters
[in]thermTemp- reference to int16_t var that will be overwritten with thermistor data

On Exit:

Parameters
[out]thermTemp- thermistor data
Returns
CmdResult - result of operation
void OWGridEye::setI2CBridgeRomId ( const RomId &  romId)
inline

setI2CBridgeRomId

sets the RomId of the DS28E17

On Entry:

Parameters
[in]romId- RomId of the DS28E17 for this module
Returns
none
void OWGridEye::setOWSwitchRomId ( const RomId &  romId)
inline

setOWSwitchRomId

sets the RomId of the DS2413

On Entry:

Parameters
[in]romId- RomId of the DS2413 for this module
Returns
none

Member Data Documentation

const uint8_t OWGridEye::DS2413_FAMILY_CODE = 0x3A
static
const uint8_t OWGridEye::DS28E17_FAMILY_CODE = 0x19
static

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