Thread: my code
View Single Post
  #10   Spotlight this post!  
Unread 28-02-2011, 09:25
mwtidd's Avatar
mwtidd mwtidd is offline
Registered User
AKA: mike
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2003
Location: Boston, MA
Posts: 714
mwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond repute
Re: my code

Quote:
Originally Posted by Garten Haeska View Post
i do need help though i want to stop my arm when it hits a limit switch, now ive searched CD and cant quite figure it out, but when it is triggered i want my arm to stop and when it is not triggered i want my arm to drive. How might i go about doing this. btw. this would replace the timer reference in my autonomy. Please help!!!!
beware of the logic here, as if the limit switch is triggered there is no way to get the arm off of the switch

my solution to this is to rather than stop, prohibit movement in one direction.

pseudo code would look something like this.

if(limit == true && y>1)
stop();
else
arm.run(js.getY);
__________________
"Never let your schooling interfere with your education" -Mark Twain
Reply With Quote