

Once you've set the COM port number and have a space in the textbox, you're ready to try it out!.

Since the staging button in Kerbal Space Program is the spacebar, we want a single space in this textbox. The listener will simulate keypresses for whatever is typed in this box. Next, position your cursor in the textbox and press the spacebar once. If you don't know what COM port your Arduino is using, open the Arduino editor program and check the bottom-right corner. Now, set the COM port number to that of your Arduino. Download, unzip, then launch the program.

Now we need to set up a listener on the computer to translate the "1"s coming from the Arduino into key presses that Kerbal Space Program will recognize. 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.
