I have problem with drumhat
It doesn’t work when I run drums.py
Please some help
Thanks
What version of Raspbian?
Try running and posting the results of:
lsb_release -a
uname -a
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(25, GPIO.IN, pull_up_down=GPIO.PUD_UP)
def test(pin):
print(pin)
GPIO.add_event_detect(25, GPIO.FALLING, callback=test, bouncetime=1)
Try saving the above to a file - test.py
- and running it with python test.py
. Hopefully I’ve not typo’d it!
I believe normally this means another script is potentially using that pin- do you have anything else running on your Pi? Especially Python scripts which might be running on boot.