Raspberry Pi Pico Makes For Expeditious Input Device

With its copious number of GPIO pins and native USB, the Raspberry Pi Pico is arguably the ideal microcontroller for developing your own platform agnostic USB Human Input Devices. But you don’t have to take our word for it. Check out how quickly the $4 USD board allowed [Alberto Nunez] to put together a pair of foot pedals for his computer.

Wiring doesn’t get much easier than this.

A peek inside the enclosure reveals…well, not a whole lot. All that’s hiding inside that heavy-duty plastic box is the Pi Pico and some screw down terminals that let [Alberto] easily wire up the female bulkhead connectors for the pedals themselves. Incidentally, while you could certainly make your own pedals, the ones used for this project appear to be the sort of commercially available units we’ve seen used in similar projects.

With the hardware sorted, [Alberto] just needed to write the software. While he could have taken the easy way out and hard coded everything, we appreciate that his CircuitPython script loads its configuration from a text file. This allows you to easily configure which GPIO pins are hooked up to buttons, and what key codes to associate them with. He didn’t really need to go through this much effort for his own purposes, but it makes the project far easier to adapt for others, so our hats off to him.

If you’re looking for a bit more inspiration, our very own [Kristina Panos] put together a Python-powered macro foot stool that you can put under your desk for rapid fire keyboard shortcuts. Plus you can stand on it to reach the top shelf, if need be.

28 thoughts on “Raspberry Pi Pico Makes For Expeditious Input Device

  1. How much force does it take to actually activate those foot pedals? My guess is not something ergonomic at all! Really like the idea here but it’s really only for infrequent use at best is all.

    1. Contrariwise! For foot switches, it’s important to have a HIGH enough actuation force. Otherwise just the weight of your foot activates it, so you have to actively keep your foot’s weight off of it. These are standard foot switches, designed with this in mind. Take a look at the buttons used on guitar pedals – you don’t see any lightweights there!

  2. I did something like this about a decade ago, whilst suffering with RSI. I cannibalised a cheap SUB mouse and rewired the left and right buttons to these exact type of foot pedals. Surprisingly usable, cheap, and definitely helped my fingers & wrist recover.

      1. Actually, I *have* done this with a 555… but not through USB.
        Buttons just short out different resistors, changing the frequency of the 555. Input is into the computer line-in audio jack. Program monitors input frequency, fires off signals when the different frequencies are seen.

        Why? So you can get multiple inputs down a single analog pair through a (literal) firewall/penetration panel.

        Coolest thing is you can fit multiple audio carriers down that analog line, and can FM modulate to send analog signals too (like ECG and respiratory signals), as well as several button presses and telemetry channels. My rig had three analog channels and 4 digital button press channels, all fitting in a 7 kHz analog bandwidth.

        This was a quarter century ago… I’d use a Teensy or a Pico to do it now.

  3. While this is an elegant way to do this, I ran into a situation where I didn’t have time for such elegance. I needed to have foot switches generate F4 and F5 codes, to start and stop video playback so that I could transcribe the audio into text. My solution was to buy a $5 keyboard from Goodwill, trace the wires to its microcontroller to determine what keys connected which row to which column in the matrix, cut off all of the PCB except for enough to operate the microcontroller, and wire the two foot switches to the appropriate column and row pins. I put this in a small project box, just big enough to put big pushbutton switches on, and put the piece of paper with the matrix encoding written on it inside the box, so that if I needed this for a different application, I could just re-wire the switches.

    But I do appreciate elegance.

  4. i usually just use a atmega32u4 based dev board for this kind of thing. but i suppose using a beefier micro could give you more resolution and less latency. but im old and dont like change.

  5. i built one of these for a specific a video game. bound a frequently-used key (but with no room for it on a regular controller) to a single button.

    i cannibalized this bootleg USB SNES controller and wired a single button to a larger push switch. it was essentially a project box with a button placed on the end, turned upside down. the metal plate was resilient enough to take foot presses but it was janky as hell.

    i have a project in mind that may involve a small USB keypad to change images on a display. currently using Arduino Nano but it doesn’t support USB. should i switch to a Pi Pico?

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.