Simple test

Ensure your device works with this simple test.

examples/adt7410_simpletest.py
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
import time
import board
import busio
import adafruit_adt7410

i2c_bus = busio.I2C(board.SCL, board.SDA)
adt = adafruit_adt7410.ADT7410(i2c_bus, address=0x48)
adt.high_resolution = True

while True:
    print(adt.temperature)
    time.sleep(0.5)