View Single Post
  #1   Spotlight this post!  
Unread 02-02-2012, 22:02
NS_Radication's Avatar
NS_Radication NS_Radication is offline
Student
AKA: Marco Schoener
FRC #1369 (Minotaur)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Tampa
Posts: 88
NS_Radication is an unknown quantity at this point
Autonomous Motor Problems

This is my first year as a programmer for my FRC Team, but I have a Java background to work off of.

I am using Netbeans 7.1 with a default program with IterativeRobot and SimpleRobot subclasses. Both are default programs that I have used for testing verbatim and the results, after I have fixed electrical and network on the Classmate (2009) issues, is the Timer.delay() function.

Following examples are from the SimpleRobot program, the IterativeRobot program is the BuiltInDefaultCode code.

In Tele-Op, the motor will respond to the joystick and, by default, has a the delay set to 0.005 seconds:

driveTrain.tankDrive(leftStick, rightStick);
Timer.delay(0.005);

In Autonomous, it has a 2 second value with a movement at half speed.

for (int i; i < 4; i++)
{
driveTrain.drive(0.5, 0.0);
Timer.delay(2.0);
}

The issue is that instead of holding the motor value until the seconds expire, the Jaguar and motor will move for a split second and wait the entire 2 seconds until repeat.

If anyone has any solution, question, comment, advice, anti-Murphy's Law Orbital cannon, or other pieces of help, it would be GREATLY appreciated!

Thank you in advanced!
__________________
Team 1369
Senior
Head Programmer (Java)
Head Electrician
Reply With Quote