Название | Raspberry Pi For Dummies |
---|---|
Автор произведения | McManus Sean |
Жанр | Зарубежная образовательная литература |
Серия | |
Издательство | Зарубежная образовательная литература |
Год выпуска | 0 |
isbn | 9781119412021 |
To open the camera connector on your Raspberry Pi board, hold the ends between your finger and thumb and gently lift. The plastic parts don’t separate, but they move apart to make a gap. This is where you insert the camera’s cable.
At the end of the camera’s cable are silver connectors on one side. Hold the cable so that this side faces to the left, away from the side with the USB socket(s). Insert the cable into the connector on the board and press it gently home, and then press the socket back together again.
Preparing Your Pi Zero or Zero W
The Pi Zero models use Mini HDMI and Micro USB sockets. As a first step, you need to plug in converters that will enable you to connect to standard HDMI and USB devices. Figure 3-8 shows the Micro-USB-to-USB converter cable and the Mini-HDMI-to-HDMI converter.
FIGURE 3-8: The micro-USB-to-USB converter cable and the Mini-HDMI-to-HDMI converter for the Pi Zero.
Plug the HDMI converter into the Mini HDMI socket indicated in Figure 3-3. The USB converter goes into the Micro USB socket, indicated in Figure 3-3 and labeled as USB on the board. Take care with this one because it also fits in the power socket.
Connecting a Monitor or TV
You can connect a display device to your Raspberry Pi in one of two ways, depending on the type of screen you have available. This means one of the Raspberry Pi’s display sockets will always be unconnected.
On the top surface of your board, on the bottom edge, is the HDMI connector. (Refer to Figures 3-1, 3-2 and 3-3.) If you're using a Raspberry Pi Zero, you should have an adapter to convert the Mini HDMI to an HDMI socket. Insert your HDMI cable in the Raspberry Pi board or the Pi Zero converter, and then insert the other end into your monitor.
If you have a DVI display rather than a HDMI display, you need to use an adapter on the screen end of the cable. The adapter itself is a simple plug, so you just plug the HDMI cable into the adapter and then plug the adapter into your monitor and turn the silver screws on the adapter to hold the cable in place. Figure 3-9 shows the HDMI cable lined up for insertion into the DVI adapter.
FIGURE 3-9: How the HDMI cable is inserted into the DVI converter.
If your television has an HDMI socket, use that socket for optimal results. Alternatively, you can use the composite video socket. On the Model A and B, it’s a round, yellow-and-silver socket on the top edge of the board. (Refer to Figure 3-1.) On the Raspberry Pi 3, Pi 2, and Model B+, it’s the same socket as the audio output on the bottom of the board. You’ll need to use a special RCA cable for this socket and you can’t just connect an audio cable.
Connect your RCA cable to the socket, and the other end to the Video In socket on your television, which is likely to be silver-and-yellow.
If you're using NOOBS, it will try to use an HDMI monitor by default, even if there isn't one connected. To force NOOBS to use the RCA cable, you need to go into the recovery options for NOOBS and then press 3 for a PAL screen (common in the U.K.) or 4 for an NTSC screen (common in the U.S.). If you have an HDMI screen or TV that you can plug in just while you set up your Pi, that's probably the easiest option. Otherwise, you need to switch on the Pi, wait a few seconds, and then press and hold Shift for about ten seconds when it's telling you to do so, and then press the number key for your output options when it's gone into the recovery menu. It's difficult to get the timing right on this when you can't see anything on your screen yet! Sean tried it a few times before resorting to plugging in an HDMI screen at the same time as the TV screen.
Note that the Pi Zero and Zero W do not have a composite video socket, but they do have composite video output. You can solder your own connector to the board where it’s labelled TV. For instructions, see www.raspberrypi.org/magpi/rca-pi-zero.
Connecting a USB Hub
Your Raspberry Pi’s USB socket(s) can be found on the right of the circuit board if you have a full-size board. (Refer to Figure 3-1 and Figure 3-2.) If you’re using a Pi Zero, you will instead have a converter cable that goes from the Micro USB socket and has a USB socket on the end of it. Your USB hub should have a USB cable that connects snugly into one of these sockets.
It’s important to use a USB hub that has its own power source, so plug your USB hub into a wall socket (mains electricity) using the power supply unit that came with it.
Figure 3-10 shows a USB hub that works with the Raspberry Pi. You plug the USB cable coming out of it into your Raspberry Pi’s USB socket, and you can then plug your other devices (such as your keyboard and mouse) into the USB hub. Look for a tiny round hole on the front of this USB hub where its power supply is connected. USB hubs come in lots of different shapes and sizes: This one has four sockets (two on each long side), but you can get compatible hubs with seven sockets, too.
FIGURE 3-10: A USB hub that works with the Raspberry Pi.
Connecting a Keyboard and Mouse
Your keyboard and mouse can be connected directly to the USB socket(s) on your Raspberry Pi, and they should work fine on the Model B+, Raspberry Pi 2, and Raspberry Pi 3. For earlier models, we recommend connecting the keyboard and mouse to an externally powered USB hub that is connected to the Pi. It reduces the risk of problems caused by the devices drawing too much power from the Pi.
If you have a Pi Zero, Model A, or Model A+, you need to connect the keyboard and mouse using a USB hub because only one USB socket is available. You can set up Bluetooth devices after you have entered the desktop environment. See the “Configuring Bluetooth devices” section, later in this chapter, for more info.
Connecting Audio
If you’re using an HDMI television, the sound is routed through the HDMI cable to the screen, so you don’t need to connect a separate audio cable.
Otherwise, the audio socket of your Raspberry Pi is a small black or blue box stuck along the top edge of the board on the Model A and B (refer to Figure 3-1), and on the bottom edge of the board on the Model B+, Raspberry Pi 2, and Raspberry Pi 3.