View Single Post
  #4   Spotlight this post!  
Unread 18-03-2011, 00:14
Danny Diaz's Avatar
Danny Diaz Danny Diaz is offline
Smooth Operator
AKA: FrankenMentor
None #0418
Team Role: Alumni
 
Join Date: Apr 2005
Rookie Year: 2003
Location: Manchester, NH
Posts: 545
Danny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond repute
Send a message via AIM to Danny Diaz
Re: Extender trouble

Quote:
Originally Posted by Tub Tubs View Post
I wanted a motor to push a metal bar out of the robot to block other robots
Then why not do yourself a favor and let the hardware do most (if not all) the work for you. In your code (the software side), all you need is to watch the value of a trigger on your joystick (or another button of your choice); once pressed, just tell your motor to "go" - don't worry about telling it to stop, let the hardware handle that for you. On the hardware side, use limit switches plugged into the Jags as stops on your bar; if done correctly, the limit switches will be normally-closed while the Bar is on your robot, and they will be open once your bar extends as far out as it needs to be. The open limit switch will cause the Jag to brake (not "break") the motor, acting as your stop.

There ya go, an incredibly simple mechanism to code and set up.

-Danny
__________________
Danny Diaz
Former Lead Technical Mentor, FRC 418
Reply With Quote