Quote:
|
Originally Posted by Mark McLeod
From the OI a button will be 0 if unpushed, 1 if pushed.
The RC is reversed and will be 1 if unpushed, 0 if pushed. (because of the pull-up)
|
...yep! and to muddy the waters a bit:
Limit switches can usually be wired "normally open" or " normally closed". If you don't like the fact that the RC is "1 if unpushed and 0 if pushed", wire the limit switch "normally closed" and it will behave as the OI
...and a few random musings:
for your desiredposition == 2,
I'd suggest giving yourselves some "room to maneuver" when it comes to setting the motors to neutral. Hitting and holding exactly 1280, may result in a lot of racheting. You may want to make that a band...say > 1278 and < 1282 or something like that
Whenever you are in the home position, re-zero your encoder counter. There is always the chance of being off a few counts as the arm moves up and down and error can build up over a lot of use.
...just my 2cents
Eric