Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Control System (http://www.chiefdelphi.com/forums/forumdisplay.php?f=177)
-   -   Joystick help (Rookie) (http://www.chiefdelphi.com/forums/showthread.php?t=63525)

A.Tup 07-02-2008 22:40

Joystick help (Rookie)
 
Hello everyone I was wondering if there is a way to change the sensitivity of the joysticks right now we barely touch them and the wheels go we would like a little less sensitivity help greatly appreciated

A.Tup
2620

PrincessJae 08-02-2008 00:52

Re: Joystick help (Rookie)
 
its in the programming code, i dont remember exactly because im not at school but i can probably help you tomorrow. What our team did was make three different "gears" you could call them for reverse, and 5 for forward, so that you gradually get faster.

RyanCahoon 08-02-2008 04:59

Re: Joystick help (Rookie)
 
The following code will scale down your joystick sensitivity:

if your original code was

Code:

pwm01 = p1_y;
change it to:

Code:

pwm01 = ( ((signed int)p1_y) - 127 ) / 2 + 127;
Change pwm01 and/or p1_y according to which PWM output and joystick you are using. You can change the scaling factor by changing the 2 (right now it's set to 1/2). For example, to set it at 1/3 power, change the 2 to a three. If you want to use a fraction like 2/3, change / 2 to * 2 / 3. Note: use fractions this way and not decimals, as it will make your code run faster because it only does integer math.

Hope that wasn't too confusing,
--Ryan

Edit: That's for MPLAB. If you're using EasyC, I'm not sure if I can help as much.

kylelanman 08-02-2008 08:26

Re: Joystick help (Rookie)
 
This thread has great solution that uses a cubic function.
http://www.chiefdelphi.com/forums/sh...ad.php?t=63069

A.Tup 08-02-2008 10:09

Re: Joystick help (Rookie)
 
ok thank you all for all the help

Mr. Lim 08-02-2008 10:32

Re: Joystick help (Rookie)
 
Quote:

Originally Posted by A.Tup (Post 694343)
Hello everyone I was wondering if there is a way to change the sensitivity of the joysticks right now we barely touch them and the wheels go we would like a little less sensitivity help greatly appreciated

A.Tup
2620

This thread is from 2004. It's a cubic transfer function like above.

http://www.chiefdelphi.com/forums/sh...2&postcount=54

Good luck!

Al Skierkiewicz 08-02-2008 10:33

Re: Joystick help (Rookie)
 
Adam,
Something no one mentioned is to ask the question "Are your speed controllers calibrated?" Quite often, the Victors do not match the charachteristics of your joysticks. Move your joysticks forward and reverse and see at which point the Victor LED is fully red and fully green. If this occurs at less than full travel on the joystick, you need to calibrate the Victor. For teams who do not perform this calibration in the software, the only way to calibrate is following the method in the 884 users manual found on the IFI website. This procedure matches the full travel of your joystick to the full output of the Victor. The joysticks and the Victors are not matched before they are put in the KOP.

A.Tup 08-02-2008 11:51

Re: Joystick help (Rookie)
 
ok thank you i will check that next time in with the robot thanks again

corcarter 10-02-2008 13:32

Re: Joystick help (Rookie)
 
i think our driver just needs to learn how to drive!!!!!


All times are GMT -5. The time now is 07:20.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi