C H A P T E R 4
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 ...