Simple test

Ensure your device works with this simple test.

examples/tpa2016_simpletest.py
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT

import busio
import board
import adafruit_tpa2016

i2c = busio.I2C(board.SCL, board.SDA)
tpa = adafruit_tpa2016.TPA2016(i2c)

tpa.fixed_gain = -16