amg88xx

package
v0.17.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2021 License: BSD-3-Clause Imports: 2 Imported by: 10

Documentation

Overview

Package amg88xx provides a driver for the AMG88XX Thermal Camera

Datasheet: https://cdn-learn.adafruit.com/assets/assets/000/043/261/original/Grid-EYE_SPECIFICATIONS%28Reference%29.pdf

Index

Constants

View Source
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
)
View Source
const AddressHigh = 0x69

The I2C address which this device listens to.

View Source
const AddressLow = 0x68

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
}

type Device

type Device struct {
	Address uint16
	// contains filtered or unexported fields
}

Device wraps an I2C connection to a AMG88xx device.

func New

func New(bus drivers.I2C) Device

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) Configure

func (d *Device) Configure(cfg Config)

Configure sets up the device for communication

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

func (d *Device) GetInterrupt() []uint8

GetInterrupt reads the state of the triggered interrupts

func (*Device) ReadPixels

func (d *Device) ReadPixels(buffer *[64]int16)

ReadPixels returns the 64 values (8x8 grid) of the sensor converted to millicelsius

func (*Device) ReadThermistor

func (d *Device) ReadThermistor() int16

ReadThermistor reads the onboard thermistor

func (*Device) SetFrameRate

func (d *Device) SetFrameRate(framerate uint8)

SetFrameRate configures the frame rate

func (*Device) SetInterruptLevels

func (d *Device) SetInterruptLevels(high int16, low int16)

SetInterruptLevels sets the interrupt levels

func (*Device) SetInterruptLevelsHysteresis

func (d *Device) SetInterruptLevelsHysteresis(high int16, low int16, hysteresis int16)

SetInterruptLevelsHysteresis sets the interrupt levels with hysteresis

func (*Device) SetInterruptMode

func (d *Device) SetInterruptMode(mode InterruptMode)

SetInterruptMode sets the interrupt mode

func (*Device) SetMovingAverageMode

func (d *Device) SetMovingAverageMode(mode bool)

SetMovingAverageMode sets the moving average mode

func (*Device) SetPCTL

func (d *Device) SetPCTL(pctl uint8)

SetPCTL sets the PCTL

func (*Device) SetReset

func (d *Device) SetReset(rst uint8)

SetReset sets the reset value

type InterruptMode

type InterruptMode uint8

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL