Pixel test¶
Ensure your device works with this test:
1# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2# SPDX-License-Identifier: MIT
3
4import time
5import busio
6import board
7import adafruit_amg88xx
8
9i2c = busio.I2C(board.SCL, board.SDA)
10amg = adafruit_amg88xx.AMG88XX(i2c)
11
12while True:
13 for row in amg.pixels:
14 # Pad to 1 decimal place
15 print(["{0:.1f}".format(temp) for temp in row])
16 print("")
17 print("\n")
18 time.sleep(1)