No description
Find a file
jerryneedell b89309de80 change read_into to readinto for i2c call
A forum post reported this error. I don't have this sensor to test the change, but the forum poster reported that it worked. https://forums.adafruit.com/viewtopic.php?f=8&t=127854
2017-12-12 15:04:05 -08:00
examples DM: update formatting on example 2017-11-27 16:44:33 -05:00
.travis.yml Lowercase library .py filename. Add CircuitPython library standard files. 2017-10-18 18:10:30 -04:00
adafruit_amg88xx.py change read_into to readinto for i2c call 2017-12-12 15:04:05 -08:00
api.rst Lowercase library .py filename. Add CircuitPython library standard files. 2017-10-18 18:10:30 -04:00
CODE_OF_CONDUCT.md code of conduct! 2017-10-31 14:05:57 -04:00
conf.py Lowercase library .py filename. Add CircuitPython library standard files. 2017-10-18 18:10:30 -04:00
LICENSE first commit 2017-06-06 14:11:40 -04:00
README.md fix typos, remove unneeded imports 2017-10-31 14:21:41 -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:

import board

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

Now, to initialize the I2C bus:

myI2C = busio.I2C(board.SCL, board.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 = amg.readPixels()
print(value)