NewPing Library: HC-SR04, SRF05, SRF06, DYP-ME007, Parallax PING))) - v1.7

oigresUPM:
Hi everyone, I would like to ask if it's possible to hold a value, I mean, if I remove my hand from the sensor, then the sensor measure out of range, I would like that the last value sent for serial (usb) was the measure from my hand to the sensor before remove... This is my sketch which I found in this post, BTW really useful!!!

You would write your sketch to hold a value. Once one cycle of pinging all the sensors is complete, it goes to the oneSensorCycle() function. This is where you would analyze the results. If you wanted to hold those results and stop pinging, this is where you would do it. The 15 sensor sketch help post shows how you would stop the ping process and resume. If you only want to know when something is in the way of one of the sensors and then hold those results. In the oneSensorCycle() function you would detect something was in the way, stop the pings, and do whatever you wanted with that information. When you wanted to restart the pings, you would use the restart code.

That's about the best I can do shy of writing your script for you, and what fun would that be?

Tim