CHAPTER 4

images

Decision Making in C

The real power of a µc is its ability to read data and take action(s) based on that data. Stated differently, a µc has the ability to make decisions based on the information provided to it. In this chapter, you will learn the various expressions that enable your program to make decisions based on the state of some set of data.

Relational Operators

As you might guess, a decision is often based on comparing the state of two or more pieces of data. You make such decisions all the time, probably without thinking much about the process that is involved in making the decision. The phone rings and you get up to answer ...

Get Beginning C for Arduino: Learn C Programming for the Arduino and Compatible Microcontrollers now with O’Reilly online learning.

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