Quote:
Originally Posted by Phalanx
We've got a winch and pulley that pulls down our spring loaded launcher, and there's a limit switch to let us know when it's fully tensioned so we can turn off the motor and lock it in place.
The winch is really fast, it takes less than 1 second to reload. So I wanted something really fast to make sure we turn off the motor quickly to avoid breaking anything.
In a worst case scenario, I can slow it down and monitor it all in Teleop. I just didn't want to do that. The global variables are later sent in Teleop to the dashboard via network tables as indicators of it's readiness, although we may move that code to the 100ms loop.
|
For a similar function on our bot, I am strongly recommending using a Jaguar and hooking the limit switch directly to the limit switch inputs on the Jaguar. This has the added advantage that if the winch moves during a collision, the Jaguar will retention. I also feel safer if high force mechanisms are directly controlled by hardware. If software also needs to see the limit switch, you could poll it via CAN bus.