Got it going.
For some reason, when I ran the program from the IDLE gui, I would get one error, and when I would try to run it from the terminal, I would get no audio, but could see the "touched/release" message.
Honestly I don't know what finally got it working, but it just started working after trying, and trying, and trying different things. I guess the final thing was changing the "...pre_init" setting to 1 channel instead of 2, and getting my .wav files solid. (Even though it still works now that I changed the channel setting to 2)
For anyone else trying to duplicate the BeetBox-
I believe Pygame only works with Python 2.7
Make sure you read the Pygame 'mixer' section at
http://www.pygame.org/docs/ref/mixer.html
Verify your .wav files are good, in the right format, and named consistently in your code.
Your .wav file needs to be in the same directory as beetbox.py
Try the command "aplay filename.wav" from the command line; it should play your sound.
The file "mpr121.py" should be in the same directory as "beetbox.py"
Study the mpr121 datasheet:
https://www.sparkfun.com/datasheets/Com ... MPR121.pdf
I left the pull-up resistors connected on the Sparkfun breakout board.
When running beetbox.py, use this command: sudo python beetbox.py, or sudo -s python beetbox.py
Study the GPIO pins, and know whether you have a version 1 or version 2 setup (and see my previous post regarding i2c bus 1 vs 0 setting in the "mpr121.py" file)
Essential GPIO info:
http://elinux.org/RPi_Low-level_periphe ... re_hacking
More GPIO info:
http://code.google.com/p/raspberry-gpio ... i/Examples
Your electrode wires should be kept to a minimum length. I have mine at the end of a six? foot flat cable, and it only kinda works (false releases and re-triggers, mainly, and had to adjust the touch threshold down to 5 to get a trigger).
Troubleshoot by getting one piece working at a time, and testing. For example, I wrote a tiny program just to play sounds with Python and Pygame. Until that was working, no sense in moving forward.
Without the tutorials on Adafruit.com and MagPi.com, and the variety of info posted on the web regarding RPi, I never would have got this project working.
Again, thank you Scott, for the great idea, and sharing your code.
n8telyons@gmail.com