Consolidated PING)))/LaserPING Object for the P1 (Pulse or Serial)

With the addition of serial output to the Rev E version of the classic PING))) sensor, I wrote a consolidated object for the P1 that works in either mode, and doesn't require a cog for serial input. The code uses CTRA to detect the quiet time between outputs which prevents a lock-up of the receive method that is coded in Spin.
Helpful methods in the object:
- get_us() (distance in microseconds, pulse mode only)
- get_mm()
- get_cm()
- get_tenths() (0.1-inch units)
- get_inches()
- in_range()
Yes, this object can be used with PING))) Rev D and earlier; one must specify pulse mode.
I posted the demo and object in ObEx: https://obex.parallax.com/obex/ping-for-ping-and-laserping/
The object has been tested and works in Propeller Tool, Spin Tools IDE, and FlexProp. There is a COMPILER constant to deal with the terminals for each environment. The attached screenshots show the same output on all three terminals (the sensor was sitting on my desk pointed at the ceiling with is almost exactly six feet above the sensor).
P2 version here: https://forums.parallax.com/discussion/176233/