Pixel test

Ensure your device works with this test:

examples/pixel_test.py
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
import time

import busio
import board

import adafruit_amg88xx

i2c_bus = busio.I2C(board.SCL, board.SDA)

amg = adafruit_amg88xx.AMG88XX(i2c_bus)

while True:
    for row in amg.pixels:
        #pad to 1 decimal place
        print(['{0:.1f}'.format(temp) for temp in row])
        print("")

    print("\n")
    time.sleep(1)