View Single Post
  #4   Spotlight this post!  
Unread 19-03-2011, 13:06
JosephC's Avatar
JosephC JosephC is offline
FF: Breakfast Company
AKA: Joseph Cupchack
no team (FiM Volunteer Extraordinaire)
 
Join Date: Sep 2010
Rookie Year: 2011
Location: Waterford, Michigan
Posts: 1,752
JosephC has a reputation beyond reputeJosephC has a reputation beyond reputeJosephC has a reputation beyond reputeJosephC has a reputation beyond reputeJosephC has a reputation beyond reputeJosephC has a reputation beyond reputeJosephC has a reputation beyond reputeJosephC has a reputation beyond reputeJosephC has a reputation beyond reputeJosephC has a reputation beyond reputeJosephC has a reputation beyond repute
Re: Bit of coding help

Quote:
Originally Posted by SoulSaber1 View Post
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);
                                                                }

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.
Reply With Quote