We want to use a limit switch to cut power off to one motor.Can this be connected to the D.C controllers directly or is the hi-technic protoboard necessary ? And if we use a protoboard will a mistake in the Wifi(like in our regionals all the robots in the feild stopped responding to the joystick commands in one match) cause the limit switch not to respond?
Can’t really answer the second question, but I’ve seen a lot of teams use the LEGO touch sensor as a limit switch.
For the first question: I’m not sure about the legality of directly connecting a limit switch inline from the DC controller to the motor. However if that is the implementation, the DC motor won’t be able to move for the rest of the match (since the limit switch stays “activated” and there’s no way to un-activate the swtich).
As for the second question, it depends on how the limit switch is programmed in your code. If the code is like:
If (Limit_Switch is on)
Motor off
Else
Custom controlling code
Then it will shut off for sure since no matter the condition of Wifi because when the limit switch is on then it doesn’t matter what the joystick command is.
"As for the second question, it depends on how the limit switch is programmed in your code. If the code is like:
If (Limit_Switch is on)
Motor off
Else
Custom controlling code
Then it will shut off for sure since no matter the condition of Wifi because when the limit switch is on then it doesn’t matter what the joystick command is."
Thanks for the reply !!! If we use a touch sensor is it possible to make the motor stop working only in one direction ? What would be the algorithim to do so(without interfering with the joystick commands) ?