Simple test
Ensure your device works with this simple test.
examples/tla202x_simpletest.py
1# SPDX-FileCopyrightText: 2020 Bryan Siepert, written for Adafruit Industries
2#
3# SPDX-License-Identifier: Unlicense
4# pylint:disable=no-member
5import board
6import busio
7
8from adafruit_tla202x import TLA2024
9
10i2c = busio.I2C(board.SCL, board.SDA)
11tla = TLA2024(i2c)
12
13for i in range(4):
14 channel = i
15 tla.input_channel = channel
16 print("Channel", channel, ":", tla.voltage)