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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.