|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Bit of coding help
For some reason this isn't working either. did you mean like this?
Code:
case 7: //ALL SENSORS ON *OR* MAYBE AT CROSS
if (time > stopTime)
{
atCross = true;
speed = 0;
gripper.set(false); //Closes gripper
gripper2.set(true); // " "
drive.arcadeDrive(-.5 , 0);
Timer.delay(1.0);
drive.arcadeDrive(0 , 0);
}
|
|
#2
|
||||
|
||||
|
Re: Bit of coding help
Quote:
Okay so I can see one clear problem here I think. Timer.delay is generally in milliseconds so you have it going backwardsfor 1 millisecond then stopping. Try increasing Timer.delay to a greater value, say 500, then try it again. Remeber if it goes berserk and doesnt stop for some reason you have a stop button. ![]() |
|
#3
|
||||
|
||||
|
Re: Bit of coding help
Quote:
Code:
Timer.delay(1000); |
|
#4
|
|||||
|
|||||
|
Re: Bit of coding help
Quote:
Quote:
Code:
Timer.delay(1.0); // only accepts doubles as an argument However, when using other functions in the Timer class, like get(), it will return in microseconds. For our minibot deployment, we start a timer and have a condition timer.get()/1000000 > 110, if true it will deploy. If false, it'll let the user know you can't deploy yet. ![]() Last edited by Robby Unruh : 21-03-2011 at 17:30. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|