Chapter 6. Accessing the GPIO Pins
In this chapter, we will look at the simplest way of interfacing with digital electronics using the
General Purpose Input and Output (GPIO) port on the Raspberry Pi. To do this, we will be using the RPi.GPIO
module, which is installed as standard on the newer versions of Raspbian.
We will also take a quick look at some of the basics of digital electronics and the additional methods of communication offered by the Raspberry Pi, including UART.
Note that some of the examples later in the chapter will require some additional electronic components, all of which can be purchased from standard high street electronics retailers.
The components required are:
- A small breadboard
- Some 0.1" male to female jumper wires
- A push to make a switch
- Some LEDs
- The appropriate resistor for the LEDs
The exact value of the resistor can be calculated using an online tool, such as the one found at ledcalc.com. Here, the supply voltage should be 3.3V, the LED current should...