Documentation ¶
Overview ¶
Package amg88xx provides a driver for the AMG88XX Thermal Camera
Index ¶
- Constants
- type Config
- type Device
- func (d *Device) ClearInterrupt()
- func (d *Device) Configure(cfg Config)
- func (d *Device) DisableInterrupt()
- func (d *Device) EnableInterrupt()
- func (d *Device) GetInterrupt() []uint8
- func (d *Device) ReadPixels(buffer *[64]int16)
- func (d *Device) ReadThermistor() int16
- func (d *Device) SetFrameRate(framerate uint8)
- func (d *Device) SetInterruptLevels(high int16, low int16)
- func (d *Device) SetInterruptLevelsHysteresis(high int16, low int16, hysteresis int16)
- func (d *Device) SetInterruptMode(mode InterruptMode)
- func (d *Device) SetMovingAverageMode(mode bool)
- func (d *Device) SetPCTL(pctl uint8)
- func (d *Device) SetReset(rst uint8)
- type InterruptMode
Constants ¶
const ( PCTL = 0x00 RST = 0x01 FPSC = 0x02 INTC = 0x03 STAT = 0x04 SCLR = 0x05 AVE = 0x07 INTHL = 0x08 INTHH = 0x09 INTLL = 0x0A INTLH = 0x0B IHYSL = 0x0C IHYSH = 0x0D TTHL = 0x0E TTHH = 0x0F INT_OFFSET = 0x010 PIXEL_OFFSET = 0x80 // power modes NORMAL_MODE = 0x00 SLEEP_MODE = 0x01 STAND_BY_60 = 0x20 STAND_BY_10 = 0x21 // resets FLAG_RESET = 0x30 INITIAL_RESET = 0x3F // frame rates FPS_10 = 0x00 FPS_1 = 0x01 // interrupt modes DIFFERENCE InterruptMode = 0x00 ABSOLUTE_VALUE InterruptMode = 0x01 PIXEL_TEMP_CONVERSION = 250 THERMISTOR_CONVERSION = 625 )
const AddressHigh = 0x69
The I2C address which this device listens to.
const AddressLow = 0x68
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct { Address uint16 // contains filtered or unexported fields }
Device wraps an I2C connection to a AMG88xx device.
func New ¶
New creates a new AMG88xx connection. The I2C bus must already be configured.
This function only creates the Device object, it does not touch the device.
func (*Device) ClearInterrupt ¶
func (d *Device) ClearInterrupt()
ClearInterrupt clears any triggered interrupts
func (*Device) DisableInterrupt ¶
func (d *Device) DisableInterrupt()
DisableInterrupt disables the interrupt pin on the device
func (*Device) EnableInterrupt ¶
func (d *Device) EnableInterrupt()
EnableInterrupt enables the interrupt pin on the device
func (*Device) GetInterrupt ¶
GetInterrupt reads the state of the triggered interrupts
func (*Device) ReadPixels ¶
ReadPixels returns the 64 values (8x8 grid) of the sensor converted to millicelsius
func (*Device) ReadThermistor ¶
ReadThermistor reads the onboard thermistor
func (*Device) SetFrameRate ¶
SetFrameRate configures the frame rate
func (*Device) SetInterruptLevels ¶
SetInterruptLevels sets the interrupt levels
func (*Device) SetInterruptLevelsHysteresis ¶
SetInterruptLevelsHysteresis sets the interrupt levels with hysteresis
func (*Device) SetInterruptMode ¶
func (d *Device) SetInterruptMode(mode InterruptMode)
SetInterruptMode sets the interrupt mode
func (*Device) SetMovingAverageMode ¶
SetMovingAverageMode sets the moving average mode
type InterruptMode ¶
type InterruptMode uint8