|
Re: EasyC Vex Programming help in RC Mode
How sensitive is it to a joystick?
If you are working where you only want it to react to the joystick to a point then what you could do is the following ...
If GetRxInput (1,1) > Max Forward (you define)
SetMotor (1,Max Forward) - If joystick is pushed farther than desired position do not let motor go any faster
If GetRxInput (1,1) < Max Backwards (you define)
SetMotor (1,Max Backwards) - Same as above only backwards
Else
MotorRcControl (0,1,1,0) - Respond to joystick value to value (180 on Joystick= 180 to motor)
If you are Not using most of the joysticks movement before it gets out of hand then you could do the following ...
If GetRxInput (1,1) > 135 -Allow play in joystick
SetMotor (1,speed desired forward) - you define
If GetRxInput (1,1) < 120 -Allow play in joystick
SetMotor (1,speed desired backwards) - you define
Else
SetMotor (1,127)
This gives the motor only two speeds that it is allowed to run.
Hope that helps. If you have any questions about this feel free to PM me.
-Sam
|