Switches with arduino

Hi everyone,

I bought the seeedstudio starter kit for arduino (19.99$ from seeedstudio.com) and I found some switches (a photo here: http://www.seeedstudio.com/wiki/index.php?title=Arduino_Sidekick_Basic_Kit#Slide_Switch).

How can I connect them to arduino? I looked for other posts in this forum and on google, but no post has worked properly.

Can you help me?

Thanks!

Jymmy097

What do you mean by "but no post has worked properly" ??

Maybe you should have a look at this page http://arduino.cc/en/Tutorial/DigitalReadSerial

and probably most of the tutorials will help you to begin with arduino and several devices.

If your question is about the "slide switches" , the central pin is connected with the left or the right one, depending on its position : left side = left pin connected, right side = right pin connected

HTH jf

Hi, Yes, I'm speaking about slide switches. So I have to connect the central pin with the GND (or the 5V?) pin and then connect, for example, the left pin with a digital pin and when I read (with digitalRead()) the value of that pin I can know if the switch is on or off (if it is on the left side it is on, else it is off). Right?

Oh, Shall I insert some resistors in this circuit?

Thanks!

Look at the link you gave in your 1rst post, there is an example that uses a button. All you need is to replace the button with your slide switch . It is just a switch, then you can decide which pin goes to the 5V (still in the example in seedstudio page), and the center pin to the input and the resistor (which then goes to Gnd). It doesn't matter which pin is connected to 5V and which one is connected with the input, as long as one of these pins is the center pin.

And then.... try to read as much as you can (use the link I gave before, and others you'll find) to understand why there is a resistor between the input and the GND ;) I'm sure you'll learn a lot and it is allways better to know why we do things .

Jymmy097: I bought the seeedstudio starter kit for arduino (19.99$ from seeedstudio.com) How can I connect them to arduino?

Can you help me?

Jymmy097

Have you tried the seeedstudio support(ed) forum?