Hey,
A few friends and I recently decided to design and build our own KSP Controllers. We were planning to build it based on @zitronen SerialIO plugin and while checking out the SerialIO post, I discovered @DrMarcel had written EthernetIO and his own companion App. EthernetIO offered a communication interface that would allow for as much separation between the PC running KSP and the controller as I wanted. The ability to set it up in my living room to play with my daughter while my PC is downstairs in my office (streaming to the living-room TV) was really appealing. I'm a hardware engineer with a fairly limited software background but I know just enough to be dangerous. I quickly settled on using a Nucleo STM32F746ZG development board for the embedded controller for two reasons. 1) I had one laying around and 2) they are cheap, easy to get and have a ton of IO. The mbed online IDE also allowed for really easy development. If you can use an Arduino, you can handle mbed.
The current version of the firmware (v0.01) is very basic. Once powered on and connected to the network it will automatically start looking for the UDP messages being sent out by DrMarcel's EthernetIO plugin. Once found, it will connect to the KSP EthernetIO TCP server and begin exchanging messages. As I haven't started the physical controller build yet, the code just looks for the USER BUTTON on the Nucleo board. If you hold the button while in flight, SAS will turn off and RCS will turn on.
Opening a console window (Serial Port available via the boards USB programming port, 9600 8N1) will show basic connection status followed by Apoapsis, Altitude, and Liquid Fuel remaining once in flight. It's just to show that the hardware is working.
Once i get the controller designed and built and write some hardware interface libraries, I'll publish it all here.
If you're familiar with the SerialIO Arduino code, then this will look very familiar, it's basically a straight port with some changes made for connection handling. There is still some of the original Arduino code commented out in places.
Requirements:
You need EthernetIO Plugin installed see here:
You'll need a Nucleo STM32F746ZG dev board (~$35CDN\$25USD)
https://www.digikey.com/product-detail/en/stmicroelectronics/NUCLEO-F746ZG/497-16282-ND/5806779
Also available from a ton of online electronics distributors
Binary file can be downloaded from here: https://drive.google.com/file/d/12JZAYZDFbZub-VGDeYezi0fjspw-ufea/view
Project source code can be found here: https://os.mbed.com/users/wakestrap/code/KSPmbedIO/
To program the board, you can drag and drop the BIN file to the drive labelled NODE_F746ZG that is created when you connect the dev board to your computer. The attached programmer will then program the primary MCU with the BIN file. For more advanced users, I suggest getting the STM32 ST-LINK Utility from ST Micro.
I'll provide examples, tutorials and better commenting once I get the hardware controller built.
Cheers,
Wakestrap