"Press a Button, Play a Sound" Debugging Help

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
ZombieDUG
 
Posts: 2
Joined: Tue Oct 26, 2010 5:46 pm

"Press a Button, Play a Sound" Debugging Help

Post by ZombieDUG »

Hey everyone,

I'm new to the forum, and new to the audio shield. So I wanted to ask the vets on here for some help on a very simple "push a button, play a sound" project that I'm tinkering with currently.

I've put the assembled audio shield through it's paces already with the "play all the .wav files on the SDcard" script on the examples page. And it works totally fine, every sound plays just like it should. So I'm pretty confident that all my solder points are correct, and there aren't any shorts or anything like that causing problems. But when I connect a simple push button grounded to one of the analog inputs on the Arduino and run a button based script......no dice.

So what I've been looking for, and something hopefully that someone on here can send me in the right direction to, is a tutorial with an arduino wiring schematic and code that I can compare and contrast my setup to.

I'm not looking for any project hand holding or anything like that. Just something to help me get my head around the principles of the library and board so that I can see where I'm going wrong.

Thanks in advance for any help guys! I really appreciate it and look forward to what you all have to offer.

User avatar
troyo
 
Posts: 26
Joined: Fri Nov 20, 2009 2:18 pm

Re: "Press a Button, Play a Sound" Debugging Help

Post by troyo »

You might try this link...

http://www.ladyada.net/learn/arduino/lesson5.html

It has info on how to hook up buttons and switches.

Also... the analog pins are labeled 0-5 for analog but 14-19 when used digitally as inputs, right?

(PS... take anything I say with a grain.... no, a huge block of salt. I'm just starting out too.. LOL).

ZombieDUG
 
Posts: 2
Joined: Tue Oct 26, 2010 5:46 pm

Re: "Press a Button, Play a Sound" Debugging Help

Post by ZombieDUG »

I appreciate the reply Troy!

I actually finally got everything working. The problem was my LOW and HIGH definitions weren't matching up to how I had my buttons wired up. So it was more of a software than a hardware problem.

And I believe when reading those analog ports for inputs and outputs, Arduino likes them to be labeled A0 - A5. I found a forum that said that a while back, and I just got into the habit. I think this might have changed with the latest Arduino build however.

But take what I say with a grain of salt as well. :)

Thanks again!

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”