Here’s the source code for the Arduino + PING))) + 7-Segment Shield ultrasonic distance sensor project I build for this video. It is the progenitor of my Arduino Nerf sentry gun code, which I’ll be posting soon. Warning: my code gets the job done, but isn’t elegant.
 
Distance Ping Alarm source

In the Maker Shed

PING))) sensor

7-Segment Shield