UntraSonic Sensor for motion detection... sensitivity question...

I am working on a project that lights an led light when motion is detected on an HS-04... Can the code be optimized to trigger the LED for fastest possible pass through?

For instance, let's say I want the LED to trigger if I pass my hand through it "super fast". I want it to reliably trigger at the fastest possible speed I can pass my hand through, is there anything I need to do to the code to maximize the sensitivity?

Probably yes, probably yes.

That's all I can say based on the not very copious amount of information provided about your project.

Anyway, welcome to the forum, and to the legion of first posters that think they're better than having to read the conspicuously marked "How to use this forum - please read" sticky!

ccj777:
I am working on a project that lights an led light when motion is detected on an HS-04... Can the code be optimized to trigger the LED for fastest possible pass through?

For instance, let's say I want the LED to trigger if I pass my hand through it "super fast". I want it to reliably trigger at the fastest possible speed I can pass my hand through, is there anything I need to do to the code to maximize the sensitivity?

The code is not the problem. The problem is how quickly will your sensor send it's series of pulses and wait for them to decay and then switch to receive the echo. You will have to be the one to determine that for your sensor specifications.

Paul