Hello, This is my first post here and I'm not really that much into electronics, I only know the basics, so please go easy on me and try to not get too technical I already tried to search this issue on google, but the ''answers'' were too technical so it didn't really help me.
I build myself a Cessna Throttle quadrant for the upcoming Microsoft flight simulator.
It's a very simple 2 metal rods attached to 2 linear sliding pots powered by a Arduino Leonardo.
The problem i'm having is, the linear pots aren't very linear. When the physical slider is on 50%. my pc shows 60%. The other pot even shows 70 to 80% when it's on 50%.
Is this a fixable thing if I install new pots? If so which ones would you recommend?
Btw I read that this is normal because of the 20% tolerance rating. But I know there are joysticks with pots in them which have true linear input, so it must be possible.
This is the pot i'm using from Conrad. ''ALPS 401768 Schuifpotmeter 10 kΩ Stereo 0.5 W Lineair''
Wiring is:
Pin 1 to 5v
Pin 2 to A0 and A1
Pin 3 to GND
(5v and GND are chained on the 2 pots)
The code (I didn't write it)
#include <Joystick.h>
Joystick_ Joystick;
int zAxis_ = 0;
int Throttle_ = 0;
const bool initAutoSendState = true;
void setup()
{
Joystick.begin();
}
void loop(){
zAxis_ = analogRead(A1);
zAxis_ = map(zAxis_,0,1023,0,255);
Joystick.setZAxis(zAxis_);
Throttle_ = analogRead(A0);
Throttle_ = map(Throttle_,1023,0,255,0);
Joystick.setThrottle(Throttle_);
delay (1);
}