I recently bought a Raspberry Pi and an Adafruit Capacitive Touch Hat. I have the solution to detecting when the bord gets touched but I don’t now how to add some sounds to it. Can anybody help me to find a solution?
This is the working code that I have:
import time
import board
import busio
import adafruit_mpr121
i2c = busio.I2C(board.SCL, board.SDA)
mpr121 = adafruit_mpr121.MPR121(i2c)
while True:
for i in range(12):
if mpr121[i].value:
print('Input {} touched!'.format(i))
time.sleep(0.25)