No description
Find a file
2017-10-31 14:05:57 -04:00
Adafruit_AMG88xx.py Update Adafruit_AMG88xx.py 2017-06-06 14:41:29 -04:00
CODE_OF_CONDUCT.md code of conduct! 2017-10-31 14:05:57 -04:00
LICENSE first commit 2017-06-06 14:11:40 -04:00
README.md readme markdown 2017-06-06 14:39:50 -04:00
readthedocs.yml code of conduct! 2017-10-31 14:05:57 -04:00
requirements.txt first commit 2017-06-06 14:11:40 -04:00

Adafruit_CircuitPython_AMG88xx

Dependencies

This driver depends on the Register and Bus Device libraries. Please ensure they are also available on the CircuitPython filesystem. This is easily achieved by downloading a library and driver bundle.

Usage Notes

Basics

Of course, you must import the library to use it:

import busio
import Adafruit_AMG88xx

The way to create an I2C object depends on the board you are using. For boards with labeled SCL and SDA pins, you can:

from board import *

You can also use pins defined by the onboard microcontroller through the microcontroller.pin module.

Now, to initialize the I2C bus:

myI2C = busio.I2C(SCL, SDA)

Once you have created the I2C interface object, you can use it to instantiate the AMG88xx object

amg = Adafruit_AMG88xx.Adafruit_AMG88xx(myI2C)

You can also optionally use the alternate i2c address (make sure to solder the jumper on the back of the board if you want to do this)

amg = Adafruit_AMG88xx.Adafruit_AMG88xx(myI2C, addr=0x68)

Reading Pixels

Pixels can be then be read by doing:

value = a.readPixels()
print(value)