Building Alarm to Prevent Theft - Need Coding Help

read up on the debounce circuit.

a bag of hippie chips or a snickers bar will fall past your sensor in less than a second.
an arm reaching up will take a full second.

alternaly, you have a power supply that feeds each of the motors.
you can tie into the main and if a motor spins, then pause the sensor for 10 seconds.