This is something I've been reminding myself quite a bit as I work through developing my interactive exhibit. It seems as if every time I solve one problem, two more seem to pop up!
In my last post about the Wonderboy, I talked about my plans to use an Adafruit wave shield hooked up to an Arduino to produce the sound that will be wired into the batting helmet. My professor, Bill, brought a wave shield into class for me to work with. I started working through the steps on the online tutorial, just with the hope of getting some sound out of the shield. Instead, every time I tired to verify the sketch before uploading it to the Arduino, I got an error message. At the time, I had just started working with sketches, codes, and processing language, so I was having a hard time figuring out what was wrong. Bill suggested I Google the error message I was getting and see if others had had the same problem. When class was over that day, and I was no closer to solving the error message, I had a conversation with Bill that went something like this:
He encouraged me to keep banging my head against the wall, and I'd figure it out (at the time I thought that was the stupidest advice I'd ever gotten - turns out he was right!) I was so determined to figure it out, I took my Arduino home and kept working. Finally, I found my error. It turns out that when I downloaded the library to use with the wave shield, I had saved it in the wrong place on my computer. Yes, you read that correctly, the mistake was that small. (Fortunately, I wasn't the only one to ever make this mistake, as I found the solution to my problem in an online forum where someone else posted about getting the same error message.)
So as this point I had the Arduino recognizing the wave shield attached to it, but I didn't have sound yet. Per the instructions of the tutorial, I was working with the waveHC library and was trying to get the dap_hc.pde sketch to play all of the home run audio files I had on a loop. (This isn't my ultimate goal, but I wanted to start somewhere.)
I tried running the dap_hc.pde sketch, but again, I was getting an error message. After Googling this error message, I was directed to the Arduino website. Turns out there had been a update the the Arduino software, and so I had to make some changes to the code in the waveHC library I downloaded.
After going through and making all the additions/changes the error messages on the Arduino sketch finally went away and there was sound - YEA!
So since I had solved the problem with using the waveHC library. I copied and pasted the sketch for the Halloween Pumpkin project (which is similar to what I plan to do with my project) into the Arduino and tried to verify it. Guess what? I got an error message! It turns out that the pumpkin project uses the older AF_Wave library (which I had read was cumbersome to use) as opposed to the newer waveHC library that I had just finished fixing on my computer.
So it was back to another round of getting error messages:
And trying to figure out how to solve them:
At this point I still haven't solved my SPI.h error message. So I'm debating between trying to work out the error and get the AF_Wave library working. Or trying to figure out how to rewrite the pumpkin project code so it will work with the waveHC library that is operational for me at this point. Either way, it involves a lot of writing and rewriting code, which is still very new for me.
Also, my professor Bill is currently soldering my wave shield so we can hook up a distance sensor as an input device. I have a feeling that this will lead to a whole new group of error messages.
Hopefully, batting .300 will continue to be good enough for this project!