https://github.com/thestaticturtle/circuitpython_tpa6130a2
Library to control the tpa6130a2 headphone amplifier
https://github.com/thestaticturtle/circuitpython_tpa6130a2
Last synced: 6 months ago
JSON representation
Library to control the tpa6130a2 headphone amplifier
- Host: GitHub
- URL: https://github.com/thestaticturtle/circuitpython_tpa6130a2
- Owner: TheStaticTurtle
- License: mit
- Created: 2023-08-26T15:27:24.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-26T15:38:31.000Z (over 2 years ago)
- Last Synced: 2025-04-01T15:53:36.758Z (about 1 year ago)
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CircuitPython_TPA6130A2
Library to control the tpa6130a2 headphone amplifier
https://www.ti.com/lit/ds/symlink/tpa6130a2.pdf
## Usage Example
```py
import i2c
from tpa6130a2 import TPA6130A2
import board
import busio
i2c = busio.I2C(board.GP1, board.GP0)
tpa = TPA6130A2(i2c)
tpa.soft_shutdown(False) # Turn the ship on, the hardware pin bypasses the software shutdown
tpa.set_mute(False, False) # Disable the mute flags on the left and right speakers
tpa.set_mode(TPA6130A2.MODE_STEREO) #Set it to use stereo
tpa.set_volume(0b110101) # set the volume 0-63
```