How to wire up a Foot Pedal Switch to Arduino

Hi there,

I recently purchased this foot pedal (Foot Pedal Switch - COM-11192 - SparkFun Electronics), however I'm not sure how to wire it up to my Arduino. I've hooked it up to a 1/4" audio jack (Audio Jack - 1/4" Stereo (vertical) - COM-11152 - SparkFun Electronics).

I haven't found much help online, so any guidance is appreciated.

Cheers!

Thank you for the link - I'm reading it now. So it does not matter which pin on the audio jack I connect GND, V and analog input to? There are 5 pins on the jack.

That is a stereo jack so it will have common, left, and right. Do you have a multimeter? Plug in your switch and see which pins have continuity when the switch is activated.

Ahh, I see. Yep I have a multimeter, I will do that! Thanks for your help. :slight_smile:

It appears it is not an analog signal, but an on/off switch.
So any digital pin can be setup for input, use a pullup resistor, and tie one of the wires to that pin, and the other wire to ground. When the pedal is pressed, the input will be LOW, when not pressed the input will be HIGH (because of the pull up resistor).
I usually like pin 7 as a first choice (I don't know why..).