Pages: [1]   Go Down
Author Topic: Resistive joystick readings.  (Read 160 times)
0 Members and 1 Guest are viewing this topic.
Scunthorpe, UK
Offline Offline
Full Member
***
Karma: 0
Posts: 129
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello all, just after some advice.

Am reading a 3 axes joystick with 5K pots on it. Am trying to calibrate the joystick readings to a speed value from 0 - 8 for all directions ie pan left/right and tilt up/down that I have working and got serial prints saying pan right 1 to 8 but my issue is my min joystick value is 377 and my max joystick value is around 644 with a centre point of around 511. My pan right has a bigger scale then pan left so I get an uneven spread of speeds from left to right. Any ideas on how I can get more even spread of speeds from left to right? Would lowering my aref voltage give me a bigger range to work with since my joystick don't use full I - 1023 range?

Thank you.

Ps. I can't post my code because for some reason I can't access the forum from my laptop so post from my phone.
Logged

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12577
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My pan right has a bigger scale then pan left so I get an uneven spread of speeds from left to right. Any ideas on how I can get more even spread of speeds from left to right?

I'm not sure I follow the question. The figures you give for the pot indicate that the center point is almost exactly in the middle of the input range. What is the 'uneven spread' you refer to?
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Pages: [1]   Go Up
Jump to: