|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Motor only responds to one way
Quote:
The upward motion of the robot has worked before when on buttons, just not through the axis. This is what the part of the program is currently. Pulley.set(operator.getY()); Problems with this? Last edited by 18mfogwell : 13-03-2014 at 12:04. |
|
#2
|
|||
|
|||
|
Re: Motor only responds to one way
Code-wise that is fine.
Does the motor controller LED react to movement on the joystick? Also, if you're using Jaguars: I know they have a feature where you can have it handle checking for limit switch stops. I haven't used Jags since 2011, but based on the guide (http://content.vexrobotics.com/docs/...artedGuide.pdf) you should have two vertical jumpers on the far right pins. |
|
#3
|
||||
|
||||
|
Re: Motor only responds to one way
Quote:
We have the jumpers on brake, if that's what you are saying. |
|
#4
|
||||
|
||||
|
Re: Motor only responds to one way
|
|
#5
|
||||
|
||||
|
Re: Motor only responds to one way
They can be turned 180° (automatic ramp mode), but they need to be there.
|
|
#6
|
|||
|
|||
|
Re: Motor only responds to one way
What do you mean by "both" LED lights? There is one LED and it can be one of three colors - Red, yellow or green. yellow is neutral (break in your case). When you say solid, do you mean you get a solid red in one direction and solid green in the other? I believe if it thinks it hit a limit switch, it will blink the direction color. If you only see one color, there is an issue with your commanded value. If you square the joystick value, remember to do joyY * abs(joyY) to preserve the sign.
|
|
#7
|
||||
|
||||
|
Re: Motor only responds to one way
Quote:
The jaguars color doesn't actually change. It stays a solid scarlet color the entire time even when in moves in the one direction and doesn't move in the other. I do not square the joystick value, should I? |
|
#8
|
|||
|
|||
|
Re: Motor only responds to one way
Some drivers find that this increases responsiveness, but it is definitely not required (nor will it fix your issue, I think it was mentioned because it will cause the symptoms you are experiencing). If you do, though, make sure you either square it as gpetilli mentioned, or cube it, to allow for negative values.
Is this an issue with the one joystick, or do you guys have extra joysticks to use instead? Last edited by ErvinI : 15-03-2014 at 22:24. |
|
#9
|
||||
|
||||
|
Re: Motor only responds to one way
Quote:
|
|
#10
|
|||||
|
|||||
|
Re: Motor only responds to one way
Show us your program if you want us to look it over.
|
|
#11
|
||||
|
||||
|
Re: Motor only responds to one way
Here is the some of the operator control period:
public void operatorControl() { double joyL, joyR, joyF; joyL = joyR = 0; double speed, Fspeed; while ( isOperatorControl() && isEnabled() ) { if(RightDriver.getRawButton(5)) { speed = 0.88; } else if(LeftDriver.getRawButton(5)) { speed = 0.88; } else { speed = 0.88; } joyL = 0.7*LeftDriver.getRawAxis(2) + 0.3*joyL; joyR = 0.7*LeftDriver.getRawAxis(4) + 0.3*joyR; //System.out.println(LeftDriver.getRawAxis(4)); //DriverStationLCD.getInstance().println(DriverStati onLCD.Line.kUser1, 1, "Left: " + joyL*speed + " "); //DriverStationLCD.getInstance().println(DriverStati onLCD.Line.kUser2, 1, "Right: " + joyR*speed + " "); drivetrain.tankDrive(-joyL*speed,-joyR*speed); Pulley.set(operator.getY()); |
|
#12
|
||||
|
||||
|
Re: Motor only responds to one way
Quote:
Quote:
|
|
#13
|
||||
|
||||
|
Re: Motor only responds to one way
Would the Joystick be replaced as "operator" and AxisType replaced as "Y"?
In other words, is this how the code would look? What would need to be replaced? |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|