Hi, I want to use the UnoRev3 and make a 3 rotary encoder button box for X Plane 11.For heading, altitude etc. It will have a few on/off buttons too.I couldn't find a pre made one for 20$ so I will make one. Never used Arduino.
Will I have any trouble with this simple project using free software and will it show up in the X Plane settings menu along with the other stick and rudder controls that I have?When a controller shows up in X Plane it makes it easy to assign it to one of many choices.
What do you know??
This sounds like a mistake. Uno cannot easily act as a Human Interface Device (HID - mouse/keyboard/joystick/etc). And it only has 2 interrupt pins. It's helpful to have one interrupt pin per encoder. I suggest swapping to an Arduino Pro Micro (don't confuse with Arduino Pro Mini).
do people do that? do you have a guide you are following? Its not impossible, but making a controller that your flight sim will recognize is a mighty challenging project if you're starting from scratch.
the question is, what do YOU know? do you know c++? Other languages? have you coded for other uCs? How willing are you to spend time learning?
I concur, the choice of board is bad, though my choice would be an esp32, faster, more interrupts & cheaper ($6-10 / board)....and you code for it pretty much the same as an arduino.
so there isn't going to be a plug n play way to do it??I don't code. I thought there were numerous apps that handled the code....Am I wrong again??!
Not with Arduino.
If you follow the instructions on the MobiFlight web site exactly, you might be able to build a working setup.
I watched a video on using the Arduino app....I should be ok...I ordered the Leonardo instead..
now where can I get about 5 encoders with large nice caps that feel high quality?? Very large is ok too...?this video is comprehensive...How to Build a Button Box - YouTube
thats why I asked if there was a project you were following...
after skimming through the video you posted, I would say yes its possible as it appears the real work is done for you already in the joystick/controller libraries. For a person with the skills, its a couple hour project at most (almost all of that in putting the hardware together)
You are gonna need to be able to understand a little bit of code to write/mod the button program(as demonstrated in the video). I'd recommend you go watch a couple "getting started with arduino" youtube tutorials, get yourself familiar with what you're doing rather than blindly copying something you don't understand. Watch them like a lecture, take notes, absorb the information...worth it in the end...and arduino is pretty cool.
Once you have learned some arduino basics & have the hardware put together, if your struggling to finish the code, myself & many others are happy to help.
PS
Am I correct that the purpose of this button box, is to have a whole bunch of custom programmable buttons at your finger tips? I do a bunch of CAM work, for which people often use a gamer mouse because of their many buttons. They sell custom CAM controllers(keypads?), but they are hundreds of dollars...it never occurred to me to make one, which is weird as I make nearly everything. With an esp32, you could probably even make it bluetooth!
anyways thanks for the heads up.
I am sure I will need some guidance along the way..
so that is what this thing does, right? gives you a bunch of customizable keys? Sorry I am unfamiliar with flight simulators & I only skimmed the video.
Bad pick.
The Pro Micro was recommended to you as it is functionally the same as the Leonardo, but in a much more usable form factor. ![]()
you're not wrong, but I can understand the pick..they don't code, they just want to get their flight sim upgraded...and they have a pretty good step by step tutorial done with the leonard. they can wire everything exactly the way they see in the video and everything looks the same...to someone who doesn't do a lot of this, thats a big advantage.
I think "bad pick" is a bit harsh. it will work & there's a detailed template to follow, I'm not gonna fault them for ordering the same parts used in the template.
but following this thread did add
building a bluetooth verson of one of these based on an esp32
to my todo list
The Uno doesn't have just two interrupt pins. It has two pins with dedicated interrupt vectors and with a variety of interrupt trigger modes, including edge triggering. But any GPIO can generate a pin change interrupt, which can also be used to service rotary encoders. I don't know what libraries support using pin change interrupts, but you can always roll your own.
its alright, it will work...... btw regarding analog pots..... I am planning on a 3 encoder and 3 button box to start with. I will leave room for changes later. Especially if I want to replace a couple of the encoders with analog pots.These will control simple functions in X plane like heading and altitude etc. I thought encoders would work but would an analog pot work also in a program like X plane which is a digital program
on my Mac mini M1. ?? They might have a better feel as far as scrolling thru the numbers...
What do you think and if so which lower cost pot might you recommend from an online source..?
@ShermanP the op doesn't have any experience coding & he's already order a Leonard...I perfectly usable choice.
@ardo9191
encoders make discrete pulses (digital Highs & Lows). They also allow for continuous rotation. If you used one to set one of your variables, you'd code it in a similar manor to if you just had an "up" & "down" button. (fyi, the scroll wheel on your mouse is an encoder). Usually an encoder is at least 2 digital IO pins(+vcc & gnd). scrolling through discrete values will be easier on an encoder than a pot.
pots are just variable resistors..meaning they are an analog device, the output will be some portion of the supplied voltage. There are 3 connections on a pot, but the value can be read with only 1 IO pin (but need to be an anaglog pin). This requires using analogRead() & which can't be on an interrupt. This will make it less responsive(click lag), though on the parameters it controls that might not be a problem.
I dont know enough about the sim program to tell you which is best, though my gut tells me either could be made to accomplish your task. Pots are less expensive & (IMO) simpler to set up. encoders are a little more slick. Lots depends on what the program wants, which I'm guessing is not a direct pot reading, so you might have to do some work in software to make it act like an encoder...but maybe others have done that & you can find a good guide.
You've done some research into this, what do others use for xPlane, encoders or pots? If people use encoders & you're just trying to save a buck(which I understand), spend the money & get the parts you know will work. Do you want to spend your time tinkering or using your flight sim? Though I'd say the former, my guess if you want the later.
if you're wanting parts supplier recommendations, it would be helpful to know where you are in the world.
thanks for info..I will use the encoders..
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.