So, I have a Yamaha KU100 drum pedal that has a 1/4” TRS jack on the side.
This normally used with a midi controller for a drum kit - but I want to repurpose it.
I know that the TRS jack on the pedal outputs a simple open closed signal - so that’s super straight forward.
What I am looking to do is be able to hook that pedal to a windows PC so that pressing the pedal (and releasing) will act as an open/closed switch that the PC will see as a simple button press.
That way I can connect it to my PC and assign that button press to a game. It would be easiest to have it natively be recognized as a keyboard button press - but I can use antimicro or joy2key or the like if necessary to help.
What’s the most straightforward skit/code to do this?
I figure I would program the board and then connect each of the two leg wires from the foot pedal to the arduino - I’d then connect the arduino to the PC using the USB cable - and then the pedal would simply act as a giant input trigger than I can assign in my game.
What do you suggest? I have a Leonardo as well as a Nano, but I figure the Nano would be most appropriate as I could 3D print a small project box and attach it right to the side of the pedal.
That way the only wire (besides the short TRS cable going from the pedal to the arduino) would be the USB cable. Nice and clean.
Not a problem however how is the PC going to recognize the signal, there are normally no switch inputs for users. Who is going to do the hardware and software design for the PC?
I was just clarifying - at first I was implying that I needed it to simulate an arcade button press - but something as simple as keyboard input is fine.
Those two things I mentioned are just apps that could take one type of button press and have the computer convert it to a keyboard key press - but most likely not needed here.
There's a sketch in the examples menu in the IDE for simulating a keyboard. I would start there.
Depending what keyboard button press you want to simulate, you might want to look at the "multimedia keyboard" library which can simulate a wider range of buttons than the regular keyboard library, like play/pause/volume up/down etc.