![]() |
OWGridEye Library for Arduino
version: 1.0.0
|
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 |
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.
enum OWGridEye::CmdResult |
OWGridEye command results.
Enumerator | |
---|---|
Success | |
OpFailure |
OWGridEye::OWGridEye | ( | RandomAccessRomIterator & | selector | ) |
OWGridEye Constructor.
setOWSwitchRomId() and setI2CBridgeRomId() must be called before any other member fxs.
[in] | selector | - MultidropRomIterator object that encapsulates ROM fxs of 1-wire protocol |
OWGridEye::CmdResult OWGridEye::connectGridEye | ( | void | ) |
connectGridEye
Connects the DS28E17 and AMG883 to 1-wire bus
OWGridEye::CmdResult OWGridEye::connectOWbus | ( | void | ) |
connectOWbus
Connects down stream devices on 1-wire bus
OWGridEye::CmdResult OWGridEye::disconnectGridEye | ( | void | ) |
disconnectGridEye
Disconnects the DS28E17 and AMG8833 sensor putting both to sleep
OWGridEye::CmdResult OWGridEye::disconnectOWbus | ( | void | ) |
disconnectOWbus
Disconnects down stream devices on 1-wire bus
|
inline |
getI2CBridgeRomId
Gets the RomId of the DS28E17 for this sensor. The romId must have been set first.
|
inline |
getOWSwitchRomId
Gets the RomId of the DS2413 for this sensor. The romId must have been set first.
OWGridEye::CmdResult OWGridEye::gridEyeAccess | ( | bool | readWrite, |
GridEyeRegister | regAdrs, | ||
uint8_t | numBytes, | ||
uint8_t * | dataBuf | ||
) |
gridEyeAccess
Provides read/write access to the AMG8833
On Entry:
[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:
[out] | dataBuf | - Read data on read operation |
OWGridEye::CmdResult OWGridEye::gridEyeGetFrameTemperature | ( | int16_t * | frameTemp | ) |
gridEyeGetFrameTemperature
Gets pixel frame(64 pixels) temperature
On Entry:
[in] | frameTemp | - buffer to hold data |
On Exit:
[out] | frameTemp | - pixel data |
OWGridEye::CmdResult OWGridEye::gridEyeGetPixelTemperature | ( | uint8_t | pixelAdrs, |
int16_t & | pixelTemp | ||
) |
gridEyeGetPixelTemperature
Gets individual pixel temperature
On Entry:
[in] | pixelAdrs | - address of pixel to read |
[in] | pixelTemp | - reference to int16_t var that will be overwritten with thermistor data |
On Exit:
[out] | pixelTemp | - pixel data |
OWGridEye::CmdResult OWGridEye::gridEyeGetThermistor | ( | int16_t & | thermTemp | ) |
gridEyeGetThermistor
Gets internal thermistor temperature
On Entry:
[in] | thermTemp | - reference to int16_t var that will be overwritten with thermistor data |
On Exit:
[out] | thermTemp | - thermistor data |
|
inline |
setI2CBridgeRomId
sets the RomId of the DS28E17
On Entry:
[in] | romId | - RomId of the DS28E17 for this module |
|
inline |
setOWSwitchRomId
sets the RomId of the DS2413
On Entry:
[in] | romId | - RomId of the DS2413 for this module |
|
static |
|
static |