Chapter 3. Displays and Other Outputs
In this chapter, you will learn how to control physical hardware via
BeagleBone Black’s general-purpose input/output (GPIO) pins. The Bone has some 65 GPIO pins that are brought out on two 46-pin headers, called
P9, as shown in Figure 3-1.
The purpose of this chapter is to give simple examples that show how to use various methods of output. Most solutions require a breadboard and some jumper wires.
Toggling an On-Board LED
You want to know how to flash the four LEDs that are next to the Ethernet port on the Bone.
Locate the four on-board LEDs shown in Figure 3-2. They are labeled
USR3, but we’ll refer to them as the
Place the code shown in Example 3-1 in a file called internLED.js. You can do this using Cloud9 to edit files (as shown in Editing Code Using the Cloud9 IDE) or with a more traditional editor (as shown in Editing a Text File from the GNU/Linux Command Shell).