View Single Post
  #4   Spotlight this post!  
Unread 17-01-2015, 16:35
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: Has anyone figured out limit switches for 2015

That's a pretty typical use of a limit switch. Here's how I would do it, using an In Range and Coerce function. When the switch value is not true, the motor control is allowed to vary between -1 and +1. When the switch is true, the motor is only allowed to be between -1 and 0, keeping it from traveling any farther forward.
Attached Thumbnails
Click image for larger version

Name:	limit switch.png
Views:	251
Size:	21.6 KB
ID:	17884  
Reply With Quote