Ultrasonic Sensor & PIR

Many thanks for that.

So that will ensure the if statement works. Would it be best to add in a count loop for the pir sensor?

Matt