zkxs / footswitch

Arduino-based switch-to-keyboard bridge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Footswitch

Arduino program allowing digital or analog switches to control keyboard buttons. For example, you could use a piano sustain pedal to control a Shift key.

I personally use this for push-to-talk keys, as moving them off my keyboard/mouse and onto foot pedals is great for situations where your hands are both fully occupied.

Building the Device

First, acquire the necessary components and tools:

Quantity Item
1 Arduino ProMicro ATmega32U4 (comes with the 12 pin connectors for a breadboard). You could also use a different board, so long as it supports the keyboard library.
1 USB Mini Male to USB A Male cable
1 Breadboard or protoboard
n Digital foot pedals
n 1/4" headphone jacks
n Mystery resistors? Pullup? Pulldown? Aren't these built in to the board? TODO
1 Switch TODO: SWITCH SPECS
1 Soldering Iron
Solder
1 Wire stripper/cutter
Some length of breadboarding wire (22awg)

Second, put it all together as follows:

TODO: SCHEMATIC

Compiling & Uploading with Arduino CLI

Install Arduino CLI

One-time setup:

arduino-cli update # Fetch index of cores and libraries
arduino-cli core install arduino:avr # Install necessary core for Arduino ProMicro ATmega32U4
arduino-cli lib install Keyboard # Install keyboard library

Compile & upload:

arduino-cli upgrade # Upgrade cores and libraries
arduino-cli board list # get the com port of your board from this
arduino-cli compile --fqbn arduino:avr:micro --port COM3 --upload

Compiling and Uploading with Visual Studio Code's Arduino Extension

  1. Install the Arduino Extension
  2. Use the board manager to install arduino:avr board support
  3. Use the library manager to install Keyboard library
  4. Somehow run the equivalent of arduino-cli update; arduino-cli upgrade to unfuck the default installation
  5. Select the correct serial port for upload.
  6. Run the Arduino CLI: Upload command

About

Arduino-based switch-to-keyboard bridge

License:MIT License


Languages

Language:C++ 100.0%