In this chapter, we programmed the most common digital input component—a push button. At first, we wrote a program to check whether the push button is pressed or not. We found that it is not efficient programming practice. So, we wrote a program that uses an interrupt mechanism. In that program, we read from the input push button and based on the input value we responded to the output LED. That was a minimal example of an interactive embedded system. A similar setup can be done with any digital input source such as a keypad, slide button, or touch button. A digital input source can also be a sensor/chip that sends ON/OFF data. In the next chapter, we will use BeagleBone's special capability to deal with analog components. This will open the gate to collect information from sensors.
18.188.137.37