Now we have a physical button that sends a message to the computer every time it is pressed.
For this project, the demo version works fine so if you don't own the game yet you can still make and test this button. Of course you will also need a copy of Kerbal Space Program. Jumper wires or several lengths of 22 AWG wire to connect the components.
Here are the things you'll need to get your own button up and running: You could make a button that brings up a specific tool in a photo editor or maybe one that refreshes the webpage in your browser. It's really quite simple, and the whole project could easily be adapted to any other purpose by changing the desired keypress. On the computer, a lightweight program listens for the signal from the Arduino and sends a simulated spacebar press to Kerbal Space Program (or whatever program is currently active on the computer). The Arduino waits for the button to be pressed and then sends a small message over USB to my computer. Here's a basic overview of how my setup works.Ī pushbutton switch is wired to one of the pins on an Arduino.