flight sim throttle not working

Hi there,
Recently, I got MSFS 2020 and decided to make a throttle for it.
based on what I read, the best bet is supposed to be to use a Leonardo board with the joystick library.
So I tried that.
When I tried to hook it up to MSFS 2020, it did not even show up! Windows recognized it, but flight simulator did not.
Does anyone have any ideas/tips?

Here is my code if it makes a difference:

#include <Joystick.h>

#define JOYSTICK_TYPE_JOYSTICK
#define THROTTLE_MIN 994
#define THROTTLE_MAX 1023
#define THROTTLE_SWING 29
#define THROTTLE_PRECISION  5


int throttle = 0;

Joystick joystick(0,0,0);

void setup(){
        Serial.begin(9600);
}

void loop(){
        delay(100);
        throttle = analogRead(A0);
        throttle -= THROTTLE_MIN;
        throttle *= 100;
        throttle /= THROTTLE_SWING;
        throttle += 1;
        throttle -= throttle % THROTTLE_PRECISION;
        
        joystick.print(" x: "," y: "," z: ", throttle, throttle);
         Serial.println();
}

Thanks!

google is always worth a five-minute search
so with this keywords
www.google.de/search?as_q=Arduino+joystick+FS+2020

I found this website which seems to be promising

https://www.bitsanddroids.com/blog/release-notes-0.2.0-xxuCgTYIjczUPDVUGUnF

best regards Stefan

StefenL38: Thanks for the suggestions!

Can anyone explain to me why my code doesn't work?
Or is it the kind of thing that you have to download third party software?

I think that 'bitsanddroids' thing is worth a shot, but it would be nice to get an explanation for why my current code doesn't work.

Thanks!

I guess I should focus on one thing at a time here.
The first problem I have is I cannot even get my board to show up on MSFS.
Has anyone been successful in getting an Arduino Leonardo to show up on MFSF control page?

I would appreciate any input.

I finally got it to work!
It turned out I had the wrong library!
I posted some comments to this project, and got the help I needed!
https://create.arduino.cc/projecthub/Steve_Massikker/diy-rudder-pedals-for-flight-simulator-f852b7?ref=search&ref_id=rudder&offset=0

cheapskate:
I finally got it to work!
It turned out I had the wrong library!
I posted some comments to this project, and got the help I needed!
DIY Rudder Pedals for Flight Simulator | Arduino Project Hub

hello sir, what do you find in this problem? I follow the comments you post on Steve's web to find out the problem. I have the same problem that arduino HID cannot be displayed in MSFS2020 even though I have used the library that Steve used, I used Arduino Leonardo. If HID is used in XPLANE11, HID items can be displayed.
BR
agus

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.