When the seismic sensor detects vibrations, it switches on the motor which turns the ultrasonic sensor. We don’t know where the prisoners are, so we will rotate the sensor until it detects them. The sensor might detect them after turning a little or after turning a lot. No matter how much the sensor has turned, it should turn back to its initial position right after the prisoners are arrested. By using the rotation sensor we can set the number of backward rotations.