![]() |
Motor only responds to one way
We are programming with the Attack 3 controller and the motor only goes down.
What should the program be to have the motors go back up? Key points:
|
Re: Motor only responds to one way
Are you doing anything before calling the motor controller's set() method? (deadband check, scaling, etc)
When you move the joystick in the up direction, does your motor controller show it is receiving a signal to move in that direction? If so, there may be a mechanical reason that the motor isn't moving rather than software/electrical. |
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? |
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. |
Re: Motor only responds to one way
Quote:
We have the jumpers on brake, if that's what you are saying. |
Re: Motor only responds to one way
|
Re: Motor only responds to one way
|
Re: Motor only responds to one way
Quote:
|
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? |
Re: Motor only responds to one way
Quote:
Is this an issue with the one joystick, or do you guys have extra joysticks to use instead? |
Re: Motor only responds to one way
Quote:
Quote:
|
Re: Motor only responds to one way
Quote:
|
Re: Motor only responds to one way
Quote:
|
Re: Motor only responds to one way
Quote:
In other words, is this how the code would look? What would need to be replaced? |
Re: Motor only responds to one way
Quote:
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()); |
| All times are GMT -5. The time now is 03:45. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi