Yes.
ls1=digitalRead(LS1); Means read the limit switch once and store the value. If you want to know what the switch is doing later, you must read it again.
Yes.
ls1=digitalRead(LS1); Means read the limit switch once and store the value. If you want to know what the switch is doing later, you must read it again.