Pixel test¶
Ensure your device works with this test:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
import time
import busio
import board
import adafruit_amg88xx
i2c = busio.I2C(board.SCL, board.SDA)
amg = adafruit_amg88xx.AMG88XX(i2c)
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)
|