Chapter 4. Controlling LED Using a Push Button
In the previous chapter, we wrote programs that were instructing LEDs to be on or off in pattern. LEDs are output devices. BeagleBone provides some information to us through LEDs, for example, by default the USER1 LED is turned on when the SD card is accessed. Sometimes, we want to give some information to BeagleBone, such as send an e-mail or send SMS. We need to use an input electronic component that will pass our information to BeagleBone. The most common input component used in the embedded world is the push button. BeagleBone has three small push buttons onboard. But they are already assigned to system critical work. So, we will use an external push button to convey our message to BeagleBone in this chapter.
Here are the topics that will be covered in this chapter:
Reading from digital components
Push button circuit setup
Program to read from push button
Reading via interrupts
Push button LED circuit setup
Program to control LED by push button...