justinnamilee / KSPboard

Arduino code and Python script for interacting with Kerbal Space Program using kRPC.

Home Page:https://taiz.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KSPboard

Arduino code and Python script for interacting with Kerbal Space Program using kRPC.

  • Arduino Side

    • Configured for controlling the switches, joystick, etc. on the physical side. Serves serial to Python client which parses and handles the rest on the PC side.
    • Enable pin that controls when the Python client exits. Pin 2.
    • Joystick is the four switch variety (P/Y or P/R), they are pulled high and should be connected to ground unless activation is desired. Additionally yaw or roll (whichever is not on the joystick) can then be put on two pedals which brings the total to six switches for full helm control. Pins 7-12.
    • Will eventually use an I/O expansion board, but for now it has support for four chosen actions using the remaining digital I/O pins. These are configured with the opPin array and constants defined at the top of the file. These are also pulled high and should be connected to ground unless activation is desired. Additionally each operation has an independent digital debounce counter. Pins 3-6.

  • Python Side

    • Accepts serial data, uses that to control Kerbal Space Program with kRPC.
    • Make sure kRPC mod for KSP is installed, then you will need the kRPC python library as well.

  • To use the scripts:
    • Flash Arduino.
    • Launch KSP.
    • Load a craft at any launch site.
    • Start kRPC server in KSP.
    • Start Python script making sure Enable Pin is pulled HIGH on Arduino.


Parts Ordered: 2017-09-19

  • 40x SPDT Microswitch: For the 10 custom actions, core action groups, etc. Got In Mail 2017-12-04 FINALLY!!
  • 2x Linear Slide Potentiometer: One for trottle, one for pitch trim. Got In Mail 2017-10-05
  • 1x 4/8-way Arcade Joystick: For pitch and roll control. Got in Mail 2017-10-23
  • 3x Rotary Encorder: Thrust limiters, trim, etc. Got in Mail 2017-10-16
  • 2x Sewing Machine Foot Pedal: For yaw control. Got in Mail 2017-10-26
  • 2x 16-port I/O Expander: To help connect it all up. Got in Mail 2017-10-16

Progress Shots

Progress of Top Board 25% Progress of Electronics 80%

About

Arduino code and Python script for interacting with Kerbal Space Program using kRPC.

https://taiz.me

License:GNU Affero General Public License v3.0


Languages

Language:C++ 75.8%Language:Python 24.2%