I'm really new to programming so bear with me. I have my program running exactly how I want it to. All I'm trying to do now is add a sort-of deadman switch that stops the loop if it is not depressed. Basically there's a tray with a limit switch on it. If the tray is pushed in, the program will run as normal. If it is not pushed in, the loop will not run. Everything I've searched for so far has been slightly different than I want and since I'm new to this, I don't know how to make that conversion.
Oh, and to clarify, I don't want the power cut to the board. If I wanted that I would just run the power supply through the switch. I only want the loop stopped. It seems like it would be a simple thing, but I'm just not finding it. Please help.