PIR sensor and DC motor

The code you posted does not have a while loop. You did not answer my question about how you are driving the motor or if the PIR is HIGH true or LOW true, Post a link to the PIR AND the code you are using NOW.