Thread: Limit Switches
View Single Post
  #4   Spotlight this post!  
Unread 08-03-2016, 23:46
Eryl2000's Avatar
Eryl2000 Eryl2000 is offline
Registered User
FRC #3024 ("My Favorite Team")
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Ashland, OR
Posts: 4
Eryl2000 is an unknown quantity at this point
Re: Limit Switches

Hi,
Let me see if I have this correct. You are currently for a lift up/down command, setting a value of +/-1, and then trying to correct that value depending on whether the limit switch on the top/bottom is pressed.

I would recommend a different approach. After getting a command to lift, check first if the limit switch is pressed. if it is, do nothing; if it is not, assign the correct +/-1 depending on lift direction.
Hope this helps.
Reply With Quote