
#include "Keyboard.h" #include "Talkie.h" #include "Vocab_US_Large. The voice also serves as delay for some buttons so that they would not be pressed too quickly.)Ī small NPN transistor is used to amplify the sound for the speaker, but due to the power limitation of the microcontroller itself (and my lack of advanced knowledge of circuits) it is not loud. (For example, when I press the map key, it would say "INFLIGHT AREA DISPLAY" :p there are just no "MAP" in the library. Not totally fit for KSP, but I always wanted to use it somewhere. I used Vocab_US_Large.h which are consisted of military/aircraft-related words. MelkorsGreatestHits modeled the combo throttle/roll handle and the joystick after the Apollo 11 command module controls. I also used a speech library called Talkie, which is is a software implementation of Texas Instruments speech synthesizer on TI products and Atari arcade games, etc. My Win 10 OS went nuts when my rotary encoder tried to press a lot of left Shift in a short time. I changed throttle up/down keys in the KSP to left Ctrl and right Ctrl. The good thing is that my controller will always be a plug-and-play device, no extra setup needed.
Ksp gamepad mods#
Since I wanted to keep it simple, I did not use any software plugins or mods to get data from the game. Keyboard modifiers (special keys for Keyboard.h) The LEDs are used to indicate the status of certain switches (keyboard output, engine, RCS and SAS). One of the switch is used to enable/disable keyboard output. Obviously only part of the keys can be set on the controller - then again, you still need the mouse to do some stuff in KSP. In effect there are 18 different switches. a 5-button board (using 1-wire to send different analog signal).


Ksp gamepad install#
So I bought a bunch of cheap regular buttons/switches (couldn't find the fancy ones), install everything in a cardboard box and wired them up:

The Leonardo and some of the Arduino microcontrollers can be used to "emulate" a keyboard and/or a mouse, by simply using the official Keyboard library to output keys (there are samples in the Arduino IDE). After playing KSP for a while, I thought I'd make something similar - something also simple - on my spare Arduino Leonardo. Many people have created their own Kerbal Space Program controller, from the simplest buttons to full-size panels or cockpits with various readout displays.
