Chapter 12: Hardware Hacking
In earlier chapters, you learned how the Raspberry Pi can be turned into a flexible platform for running a variety of software. In this, it’s not alone: any desktop or laptop can run the same software, and in many cases run it far faster than the Pi’s low-power processor can manage.
The Pi has another trick up its sleeve, though, which places it above and beyond the capabilities of the average PC: its 26-pin general-purpose input-output (GPIO) port, located on the top-left of the Pi’s printed circuit board.
The GPIO enables the Pi to communicate with other components and circuits, and allows it to act as a controller in a larger electronic circuit. Through the GPIO port, it’s possible to have the Pi sense temperatures, move servos and talk to other computing devices using a variety of different protocols including Serial Peripheral Interface (SPI) and Inter-Integrated Circuit (I²C).
Before you can get begin building circuits to use with the Pi’s GPIO port, however, you’re going to need some additional equipment.
To start building circuits that can be controlled by the Pi’s GPIO port, you’ll need various components and tools. The following list provides a sample shopping list for getting started with electronics:
• Breadboard—An electronic breadboard provides a grid of holes spaced at 2.54 mm intervals into which components can be inserted and removed. Below each grid is a series of electrical contacts, which allow components ...