O'Reilly logo

Beginning Arduino Programming by Brian Evans

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

C H A P T E R  4

Making Decisions

In the last chapter, we explored variables and how to declare them, their data types, assigning values, and performing simple operations using them. In this chapter, we will put the variables to work with some fundamental structures that the Arduino uses to make decisions and perform repetitive operations. This could include reading a switch or sensor and doing something based on its input, performing one or a set of operations for a defined number of times or until a different condition is met, or performing a range of operations depending on a range of conditions.

Our next project, Tilt Blink, adds a tilt switch to our RGB LED to form the basis for the rest of the chapter’s in-depth discussions of the various ...

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