Raspberry Pi For Dummies. McManus Sean
Чтение книги онлайн.
Читать онлайн книгу Raspberry Pi For Dummies - McManus Sean страница 11
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. (Refer to Figure 3-2.) If you have earphones or headphones from a portable music player, you can plug them directly into this socket.
Alternatively, you can plug a suitable cable into this socket to feed the audio into a television, stereo, or PC speakers for a more impressive sound. Figure 3-11 shows such a cable with the Pi’s 3.5mm audio jack on the right of the picture, and the two stereo plugs that feed audio into many stereos shown on the right. The cable you need might be different, depending on the input sockets on your audio equipment.
FIGURE 3-11: A cable for connecting your Raspberry Pi to your stereo.
If you’re using PC speakers, note that they need to have their own power supply.
Connecting to Your Router
The Raspberry Pi Model A, A+, and Zero have no wired network connection on the board. The other Raspberry Pi models have an Ethernet socket on the right edge of the board, indicated in Figures 3-1 and 3-2. Use this socket to connect your Raspberry Pi to your Internet router with a standard Ethernet cable.
The Raspberry Pi automatically connects to the Internet when used with a router that supports the Dynamic Host Configuration Protocol (DHCP), which means it works with most domestic routers. For advice on troubleshooting your Internet connection, see Appendix A.
If you have a Wi-Fi adapter, you can plug it into a USB socket so that it's ready for when you switch on your Raspberry Pi.
Connecting the Power and Turning on the Raspberry Pi
The last thing you should do is connect the power. The Micro USB power socket is indicated in Figures 3-1, Figure 3-2, and 3-3.