JohnB155 Posted November 29, 2020 Report Share Posted November 29, 2020 Hello, If I hook up a rotary encoder output to the digital pins of the Arduino board, (and the +5V and the gnd) can I open FSUIPC7 and assign this encoder to the aileron. I am trying to use a rotary encoders for the joystick ailerons and elevators thru the ARDUINO board Link to comment Share on other sites More sharing options...
Pete Dowson Posted November 29, 2020 Report Share Posted November 29, 2020 2 hours ago, JohnB155 said: If I hook up a rotary encoder output to the digital pins of the Arduino board, (and the +5V and the gnd) can I open FSUIPC7 and assign this encoder to the aileron. I am trying to use a rotary encoders for the joystick ailerons and elevators thru the ARDUINO board Encoders normally act as a pair of buttons -- turning one on and off when turned one way, and a different button the other. They aren't axes as such and not really suited to flight controls like ailerons. You could try the INC and DEC controls for it though. My Arduino needs a COM program written in Lua as a plug-in to allow use in my sim. Has your Arduino a normal Joystick interface? If not then FSUIPC won't be able to use it directly. Pete Link to comment Share on other sites More sharing options...
JohnB155 Posted November 29, 2020 Author Report Share Posted November 29, 2020 Yes my Ard Leo has a joystick interface, and it also shows up as a game controller in my win 10. There is a sketch I downloaded that does that. I was wondering, Pete, what do the racing simmers do? They have steering wheels with a DC motor + encoder which gives the force feedback to the wheel, and the encoder also provides the input to the desktop. Link to comment Share on other sites More sharing options...
Pete Dowson Posted November 29, 2020 Report Share Posted November 29, 2020 3 hours ago, JohnB155 said: They have steering wheels with a DC motor + encoder which gives the force feedback to the wheel, and the encoder also provides the input to the desktop. Not my steering wheel -- it has an axis for the steering itself. I don't know what an encoder of the type you must mean would be for on the force feedback side of things -- FF is a completely different matter. See what the calibration screen in Windows game controller properties shows when you rotate your encoder. It will probably be two buttons, one for each direction. As i said, you can try to use those to increment or decrement the aileron value. All i am saying is that it is nowhere near as good as using an analogue axis like one supplied by a potentiometer. It would be akin to flying using the keyboard. If you are happy with that then fine. If your racing wheel users find their steering smooth and responsive using an encoder for steering, then fair enough. I just don't think I would. Pete Link to comment Share on other sites More sharing options...
Kellas Posted December 7, 2020 Report Share Posted December 7, 2020 Hi there, Could you please share your code? I have the joystick library installed but having a bit of trouble with my encoder. Thanks Link to comment Share on other sites More sharing options...
Pete Dowson Posted December 7, 2020 Report Share Posted December 7, 2020 9 hours ago, Kellas said: Could you please share your code? Who is this addressed to? Which 'code'? Pete Link to comment Share on other sites More sharing options...
Kellas Posted December 7, 2020 Report Share Posted December 7, 2020 (edited) My apologies, I'd like to see what the code looks like for a rotary encoder using the Arduino joystick library. I have tutorial code that displays the encoder readings in a terminal but I'm having a bit of a hard time assigning it to a joystick axis. Yes, I did see a blip on two buttons as well but still cant assign them in the sim. It looks like using a pot would be much easier. Are there any considerations with a multiturn pot? I'm building a trim wheel. Thanks in advance Edited December 7, 2020 by Kellas Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now