Knob Box

This is really interesting. It inspired me to create a button box for ATS using an arduino uno. It is presented as a usb HID keyboard. Unojoy library only has a limited number of buttons and I needed about 20. I used a keypad matrix wiring diagram for all the buttons except the encoder switches which I read from one of the user comments on the product page, that the switch cannot participate in a matrix ( Apparently those encoders without breakout boards can ) so I used a digital pin for each. The encoders required a separate procedure for determining clockwise and counterclockwise motion and the A and B channels required each a digital pin. I used the AMstudio button box code but removed all the joystick code and replaced with serial printing of keyboard scan codes.

Your encoders alone would need 10x3 digital pins (30). Each switch will require one pin as well (12) and I think each LED will require one as well (12). It looks like you used all your IO pins. Can you elaborate on the wiring diagram? Also can you give details about your shopping list, links perhaps to where you purchased the components, especially that case? Also, are there any other buttons that you wish you could have put in the box? I also assume that this does not require an external power supply and is simply usb powered.

I would like to venture into creating a button box for MSFS 2020 eventually. I don’t think you used a keypad matrix wiring diagram and I don’t know how mobiflight can deal with that. I don’t know anything about mobiflight at this juncture but I assume they do button assignments to FS2020 functions. A keypad matrix would be a little more complicated to setup. Perhaps they even have bidirectional communication so the status of aircraft systems could be translated to LED activation.

If this project was done on an UNO ( I got a few of them free a while back ) then there could be room for 6x6 buttons (36) in a keypad matrix and the remaining 8 digital pins could be hooked up to 4 rotary encoders total. I could possibly use two UNO boards in one box which will give me 28 digital pins and 12 analog pins total of 40 but the keypad matrix will save some of the pins so I might have enough to support all your buttons and encoders. I actually have two UNO boards right now connected to one USB port and they seem so far to be working. One is the button box and the other is an UNO configured as Unojoy joystick to read the potentiometers and switches of a Logitech G29 shifter.

I will probably need to directly interface with FS2020 to determine status of switches and such. I haven’t figured that out yet. Controlling FS2020 is a matter of simply sending the appropriate keyboard scan code with a button press. Even the rotary encoders are treated as buttons with a clockwise or counterclockwise click turn being sent as a keypress. Or possibly use Mobiflight for each separate arduino if that is possible.

Possibilities.

You know, I just realized, perhaps a pitch trim control would be a good addition to the setup. A rotary encoder on the side of the box with a large disk for turning.

Chris