When we run this project, the output should look similar to the following screenshot:
This screenshot shows that an object tripped the infrared sensor twice, where IR Detected is printed to the serial console and the crash sensor once, where Collision Detected was printed to the serial console. It also shows the distance that the rangefinder returned as the closest object.