O'Reilly logo

Mastering Arduino by Jon Hoffman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Running the project

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required