Quote:
Originally Posted by Garten Haeska
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);