Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: Need help getting rotary encoders to work on msfs2020

  1. #1
    Junior Member
    Join Date
    Nov 2021
    Posts
    2

    Need help getting rotary encoders to work on msfs2020

    Just a little background. I'm not very good with programming, but I like tinkering with electronics and doing flight sims. So I decided to build my first flight panel. It has multiple momentary switches, rotary switches and five rotary encoders with buttons. I intend to use the rotary encoders to control the altitude select, vertical speed, heading bug etc on Microsoft Flight Simulator 2020.

    I basically copied codes from the net and was able to get it to work (well, most of it). Using the "joy.cpl" application on windows, I am able to verify that ALL the buttons work. LEDs work too!

    My problem is that the rotary encoder movements (both clockwise and counter-clockwise) are not recognized by the computer. When I am on Arduino IDE, using the Serial Monitor, i can confirm that all the knobs work as intended. But outside Arduino IDE, i can't seem to get any response at all. Since there is no response using the joystick configuration app, MSFS also doesn't recognize the rotary encoder movements.

    Currently, I am only able to use the buttons, which is a shame. I'd really like to make use of the rotary encoders. I must be missing something. Could anyone please assist? Apologies if this is a super noob query as I am still getting the hang of coding.

    Thanks in advance!

    Note:
    I've attached the .ino file to this post. I'll see if i can come up with the schematics, too, but basically, I hooked up all ground pins of the encoders to ground, all positive pins to the 3.3v on the teensy, then each clk, dt and sw pin gets one digital pin each on the board.
    Attached Files Attached Files

  2. #2
    Junior Member
    Join Date
    Nov 2021
    Posts
    2
    Quote Originally Posted by astroyomar View Post
    Just a little background. I'm not very good with programming, but I like tinkering with electronics and doing flight sims. So I decided to build my first flight panel. It has multiple momentary switches, rotary switches and five rotary encoders with buttons. I intend to use the rotary encoders to control the altitude select, vertical speed, heading bug etc on Microsoft Flight Simulator 2020.

    I basically copied codes from the net and was able to get it to work (well, most of it). Using the "joy.cpl" application on windows, I am able to verify that ALL the buttons work. LEDs work too!

    My problem is that the rotary encoder movements (both clockwise and counter-clockwise) are not recognized by the computer. When I am on Arduino IDE, using the Serial Monitor, i can confirm that all the knobs work as intended. But outside Arduino IDE, i can't seem to get any response at all. Since there is no response using the joystick configuration app, MSFS also doesn't recognize the rotary encoder movements.

    Currently, I am only able to use the buttons, which is a shame. I'd really like to make use of the rotary encoders. I must be missing something. Could anyone please assist? Apologies if this is a super noob query as I am still getting the hang of coding.

    Thanks in advance!

    Note:
    I've attached the .ino file to this post. I'll see if i can come up with the schematics, too, but basically, I hooked up all ground pins of the encoders to ground, all positive pins to the 3.3v on the teensy, then each clk, dt and sw pin gets one digital pin each on the board.

    Nevermind. Was able to solve the problems by using the encoder library. THanks anyway

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •