pygame 2.0.1 (SDL 2.0.9, Python 3.7.3)
Hello from the pygame community. Contribute - pygame wiki
This example lets you play the drums with Drum HAT!
Pads are mapped like so:
7 = Rim hit, 1 = Whistle, 2 = Clash
6 = Hat, 8 = Clap, 3 = Cowbell
5 = Snare, 4 = Base
Press CTRL+C to exit!
XXX When I press any of the pads I get: XXX
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/cap1xxx.py”, line 450, in _handle_alert
File “/usr/lib/python3/dist-packages/cap1xxx.py”, line 464, in _trigger_handler
self.handlers[event][channel](CapTouchEvent(channel, event, self.input_delta[channel]))
File “/usr/lib/python3/dist-packages/drumhat.py”, line 101, in _handle_press
File “/home/nick/Python/drums.py”, line 39, in handle_hit
IndexError: list index out of range