O'Reilly logo

Arduino Essentials by Francis Perea

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

Summary

In this chapter, we had an introduction to the use of digital inputs by working with two different examples, each one showing different devices that can be used as digital sensors.

We saw what a momentary push button is and its particularities and also learned the right way to connect one to Arduino to be used as a digital input.

We also saw that there are lots of other devices that can be used as digital sensors and, in a second example, we used an optocoupler as an optical switch to build a coin detector.

From the point of view of programming, we met the if control structure in its two versions, simple and with a negative else branch, and learned that it can be the basis of any logical decision in our code.

In the next chapter, we are going ...

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