Go Down

Topic: Waveshield + 6 buttons = Soundboard (Read 5232 times) previous topic - next topic

Gymnae

Hello everyone,

I am new to Arduino and I have two projects coming up. The first one is based on using the Wave Board, which I bought and is ready to use.
I should mention that I am total n00b in regards to electronics. I know how to solder, I know how to read resistor markings but I don't know the math.
So my question is: How should I wire the Buttons? I have no idea which resistors (if any) I need to use and how to connect them to the Arduino or Wave Board. Adafruit has an example (http://www.ladyada.net/make/waveshield/examples.html) of a six button sound player. I'd like to follow this example, but sadly they don't describe how to wire it up. Most likely they don't expect such newbie questions once people come so far.
The buttons I want to use are, for now, simple push buttons, later on I want to include Arcade Style buttons by sparkfun.
If you could help me out there, I would be grateful. I have installed fritzing to plan the layout beforehand.

Big Oil

There's a button tutorial here: http://www.ladyada.net/learn/arduino/lesson5.html, the resistors you would need are listed.  Read about the pull-up and pull-down resistor configurations in that tutorial.  You will need a 10,000 ohm resistor and a 100 ohm for each of your buttons. 

Gymnae

Ok, thank you for the link. I will try to follow and understand the tutorial. Also thanks for the heads up regardings resistors

amacmullen14

In fact, you don't even need the external pullups.   If you digitalWrite a pin, configured as an INPUT, HIGH, it turns on internal pullup resistors.  Then, you only need to connect the button between the switch and ground.

Gymnae


In fact, you don't even need the external pullups.   If you digitalWrite a pin, configured as an INPUT, HIGH, it turns on internal pullup resistors.  Then, you only need to connect the button between the switch and ground.


Ok, thank you, then I will try that and report back. I hope I'll find today or tomorrow.

Gymnae


In fact, you don't even need the external pullups.   If you digitalWrite a pin, configured as an INPUT, HIGH, it turns on internal pullup resistors.  Then, you only need to connect the button between the switch and ground.


So if I get you  right, I connect the button on the one end to any digital in, and the other cable to GND. The tutorials I am sticking to, or better, the sketch I would like to follow is this one:
http://www.ladyada.net/media/wavshield/wavehc_play6interonce.pde

It says there:
Code: [Select]
// Make input & enable pull-up resistors on switch pins
  for (i=0; i< NUMBUTTONS; i++) {
    pinMode(buttons[i], INPUT);
    digitalWrite(buttons[i], HIGH);


So I guess I can just follow your advice?

Also, I group all cables going to GND, because otherwise the six cables would never fit, I also guess this is ok.

Go Up