View Single Post
  #1   Spotlight this post!  
Unread 04-02-2017, 13:02
Robodawgs2221 Robodawgs2221 is offline
Registered User
FRC #2221
 
Join Date: Jan 2017
Location: Mandeville, Louisiana
Posts: 8
Robodawgs2221 is an unknown quantity at this point
Timer.Delay stops motor movement?

I'm currently trying to program autonomous and it's working, I've isolated this issue to be with the Timer.Delay(seconds) command. When hovering over the command, it states that it allows: "Motors [to] continue to run at their last assigned values," but it simply stops them for the time allotted. Are there any alternative timing methods that allow motors to continue to run and change the command after an allotted time?

code:
Code:
case leftAuto:
			System.out.print("YOU'RE LEFT");
			Timer.delay(2.5);
			arcadeDrive.drive(1, 0);
			Timer.delay(5);
			arcadeDrive.drive(0.75, .6);
			Timer.delay(3);
			solenoid2.set(DoubleSolenoid.Value.kForward);
			Timer.delay(2);
			solenoid2.set(DoubleSolenoid.Value.kReverse);
			arcadeDrive.drive(-1, .8);
			Timer.delay(4.8);
			arcadeDrive.drive(-.25, 0);
			Timer.delay(2);
			break;
Reply With Quote