View Single Post
  #4   Spotlight this post!  
Unread 17-02-2013, 23:09
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: How to code limit switch to stop movement

I have an idea for a small architectural change to make it work. Instead of setting the articulator's motor value directly, have your move() and stop() methods set a global variable. Then have a small piece of "main loop" code that continually reads the global and the limit switches then sets the motor appropriately.
Reply With Quote