Here we go again: Building my next Viggen-themed button box

So it has been a few months since i finished my CK-37 button box, and since then i have obviously been thinking about my next project to add an array of nice clicky things to my desk. I use a empty 19’ rack as monitor stand, and what would be a better choice than to turn it into a engine/autopilot control panel for my beloved swedish plane?

Now, you might wonder, what is the giant empty space in the centre for? Thats where the HyperPixel 4.0 fits in. My plan is to stream the radar screen from a virtual second monitor via a webserver to the Raspberry Pi attached to the screen. The switches, buttons and LEDs will be connected to one or multiple Arduinos that talk to the Raspi either over I2C or USB. Inputs will be send back to the webserver, which in turn acts as a virtual joystick.
The first step is now to get the screen up and running, followed by the easier but expensive part of ordering all the other hardware.


MOAR…! :eyes:

Looks really interesting!


Well here i am back with the first results:

Getting the Screen and Raspi running was the easy part, getting the screen was where it got hairy. Since i dont have a second monitor to export the radar onto, a virtual solution was needed. I would prefer a purely software based approach, but that would require some driver magic so i am currently using an HDMI capture stick.
Now, lets get the video from the fake second monitor to the Pi. My first idea was to use OBS to screencap the second monitor, relay the RTMP stream over to a nginx server, turn it into an HLS stream and display that as webpage on the Pi. If that sounds unnecessary complicated, it was and it produced video with an obviously unacceptable 20 second delay. After that i tried a multitude of things: NVIDIA Shield (Only worked with the main monitor), Steam Link (Same), RDP (No working client on the Pi). Thats when i, in all my intellectual might, finally decided to google “screen share web realtime” and discovered WebRTC.
Now it was only a matter of setting up a NodeJS webserver, copy pasting tutorial code, writing a simple web page with the video element embedded, cursing because i was getting no video, reading a different tutorial, rewriting everything from scratch, rewriting everything again, finally discovering a dumb mistake i made in the beginning and writing “donkey” on my forehead before i finally got this beautiful result.
There is at most a 0.5 sec delay and the resolution is great, making it way more readable than the in-game screen. The next step is to learn some more CSS so the video on the Pi looks better and properly fills the screen, before ordering 170€ worth of electronics and aluminum.


Weeks of configuration can save you hours of planning. :grinning:

© 2021 | Articles Website | Forums Rules & FAQ