Selector Switch instead of Potentiometer in MIDI Controller

I have a MIDI controller using a Leonardo card and it works fine. I'd like to use a selector switch instead of a potentiometer. The idea is that I will have a 3 position switch that will change the amp module on my synth. I am familiar with MIdiPipe and was hoping that I could use a guitar pickup selector switch. The plan would be that I would attach it like a pot but use resistors to bring the signal voltage down in the different positions



.

I've attached two pics. The first pic shows the switch. The contact on the left is where the 5V hooks up and the other contacts are the 3 outputs.

The 2nd attached pic shows how I hooked it up to the Arduino. I used an input pin that was being used with a pot which worked and output MIDI CC 006. Since the switch doesn't have a ground like the pot had I tried hooking up the ground to the +5V input contact with a 10KΩ resistor, thinking that would make the whole thing the same as a pot but that didn't work.

What I'm hoping for is that in the first position I'd generate a MIDI CC with a value of 127 and in the other positions I'd get MIDI values of say 100 and 64. I can change the CC's to SysEx messages in MIdiPipe. With MidiPipe I can change anything into anything, I just need 3 different CC's from the 3 positions of the switch. I don't understand why it isn't working like a pot with detents. Doesn't the analog in pin just react to different voltages?

Any ideas?

Thanks!

Hello
Do you have three digital input pins free?

Yes, I could use 3 digital pins. I would probably end up using a Mega if I need to do that, but that is all doable.

Thanks

I was wondering - where are the next two pages of this thread?

Connect the 10 kΩ between ground and the analog in pin.

Yes, in the end I did have to add that 10K resistor, thanks.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.