Setting up a limit switch