so you want to detect when the limit switch GETS activated (state change), not when it IS activated.
a boolean could also be used to remember that you've done. the sequence and should not do it again
so you want to detect when the limit switch GETS activated (state change), not when it IS activated.
a boolean could also be used to remember that you've done. the sequence and should not do it again