View Single Post
  #1   Spotlight this post!  
Unread 01-29-2016, 09:17 PM
frcStuff's Avatar
frcStuff frcStuff is offline
フォスタ--
FRC #4268 (Beehive Robotics)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Salt Lake City
Posts: 10
frcStuff is an unknown quantity at this point
Victor Programming Problems

My team is using Victor 888s to control motors. My problem is that when ever I run the test method (which sets them all to 0.7 while the button is pushed and 0 when it is not) the motors either jump one at a time (randomly) or don't move at all.

This is how I initialized the victors:

Quote:
Victor left = new Victor(0);
Victor right = new Victor(1);
Victor liftMotor1 = new Victor(4);
Victor liftMotor2 = new Victor(5);
Victor liftMotor3 = new Victor(6);
Victor launchMotor1 = new Victor(7);
Victor launchMotor2 = new Victor(8);
This is the testPeriodic method:

Quote:
public void testPeriodic()
{
LiveWindow.run();
left.enableDeadbandElimination(true);
right.enableDeadbandElimination(true);
liftMotor1.enableDeadbandElimination(true);
liftMotor2.enableDeadbandElimination(true);
liftMotor3.enableDeadbandElimination(true);
launchMotor1.enableDeadbandElimination(true);
launchMotor2.enableDeadbandElimination(true);

if (Stick.getRawButton(2))
{
left.set(0.7);
right.set(0.7);
liftMotor1.set(0.7);
liftMotor2.set(0.7);
liftMotor3.set(0.7);
launchMotor1.set(0.7);
launchMotor2.set(0.7);
}

left.set(0.0);
right.set(0.0);
liftMotor1.set(0.0);
liftMotor2.set(0.0);
liftMotor3.set(0.0);
launchMotor1.set(0.0);
launchMotor2.set(0.0);
}
Thanks so much for your help.
Reply With Quote