View Single Post
  #7   Spotlight this post!  
Unread 17-02-2015, 23:09
teslalab2's Avatar
teslalab2 teslalab2 is offline
RogueBotix LLC
VRC #8091
Team Role: Mentor
 
Join Date: Feb 2015
Rookie Year: 2014
Location: Austin MN
Posts: 109
teslalab2 will become famous soon enoughteslalab2 will become famous soon enough
Re: Limit switch help

Are you limit switches wired correctly? the switch needs to be wired from signal too ground. the signal pin is held high until you ground it. so the value that you read will be inverted. you either need to rewire the switch, or put a not in front of the limit switch, such as

Code:
If(!limitswitch.Get())
{
motor.Set(.5);
Wait(sometime);
motor.Set(0);
}
Reply With Quote