© Jack Purdum 2015
Jack PurdumBeginning C for Arduino10.1007/978-1-4842-0940-0_4

4. Decision Making in C

Jack Purdum
Ecosoft, Inc., Cincinnati, Ohio, USA
The real power of a μc is its ability to read data, make a decision based on that data, and then take the appropriate action(s). Stated differently, a μc has the ability to make decisions based upon the information provided to it from the “outside” world via various input devices. In this chapter, you will learn the various expressions that enable your program to make decisions based upon the state of some set of data.

Relational Operators

As you might guess, a decision is often based upon comparing the values of two or more pieces of data. You make such decisions all the time, probably without ...

Get Beginning C for Arduino: Learn C Programming for the Arduino, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.