Go to Post If you have not had a positive experience in FIRST, please don't bring those that have down. - Jeff K. [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:28 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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