Add sounds to Adafruit Capacitive Touch Hat


#1

Hello,

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)

#2

some code from there github,should help,i used this , still in the process of getting my own sounds to replace the one they are using in this example …I dont code myself ,but I’m really good at copy paste,lol


#3

When I try that code code then i get an error on line 4:

Import Adafruit_MPR212.MPR121 as MPR121

Because there is no module named ‘Adafruit_MPR212’.


#4

I’m a Pi novice at best ,so i really dont have an answer for you , of all the hats i have this one for me was the hardest one to get installed and working correctly, Adafruit dosn’t care about this board in my opinion,they say on there site that they are working on a easy install but that promise is a few years old now … this is the link i worked with to install it ,took me a few tries a lot of copy/paste using a SSH connection .