Raspberry Pi For Dummies. McManus Sean

Чтение книги онлайн.

Читать онлайн книгу Raspberry Pi For Dummies - McManus Sean страница 10

Raspberry Pi For Dummies - McManus Sean

Скачать книгу

on downloading the operating system and copying it to an SD or Micro SD card.

To insert a MicroSD card in a Model 2, 3, A+, or B+, turn your Raspberry Pi over, as shown in Figure 3-4, so that you’re looking at its underside. The metal MicroSD card socket is labeled and is on the left edge of the board. Slide your MicroSD card into the slot face up. On the Raspberry Pi 3 Model B, the card will slide into place. On the other models, it will click into place. The card will overhang the board slightly.

       FIGURE 3-4: The MicroSD card, lined up for insertion in a Raspberry Pi 3 Model B.

To insert an SD card in a Model A or Model B, flip your Raspberry Pi over. (See Figure 3-5.) On one of the short sides is a plastic fixture for your SD card. Slide the SD card in with the label side facing you, and gently press the card home to make sure it’s well connected. The fixture is not big enough to cover your SD card, so most of the card will stick out from the side of the board and will be visible when you turn your Pi back over again. You can remove the card by just pulling it out again.

image

       FIGURE 3-5: The SD card, correctly aligned with the socket on the underside of the Model A.

The Pi Zero and Zero W have the MicroSD card socket mounted on the top surface of the board. Insert the card with the label side facing you, as shown in Figure 3-6.

image

       FIGURE 3-6: The MicroSD card, lined up for insertion in a Raspberry Pi Zero.

      To remove the card again, just pull it if you have a Raspberry Pi 3 Model B or a Pi Zero. For the other models, press the card in and the spring will push it back out toward you. You can then pull it out.

      warning To avoid data loss, you should only insert and remove SD and MicroSD cards with the power switched off.

      Connecting the Raspberry Pi Camera Module

There are lots of accessories and add-ons available for the Raspberry Pi, but the Raspberry Pi Camera Module has the rare status of being an official product from the Raspberry Pi Foundation, so we show you how to connect it. The camera module is a small circuit board, with a strip of ribbon cable that plugs directly into the Raspberry Pi board. (See Figure 3-7.) It’s easiest to connect the camera before you plug your Raspberry Pi into any cables.

      On the board of your Raspberry Pi is a connector for the camera. You can see it labeled in Figures 3-1, Figure 3-2, and 3-3. (Remember that the Pi Zero does not have a camera connector).

      As you can see in Figure 3-7, the lens has a plastic film over it, to protect it. Pull the green plastic tab to remove the film.

image

       FIGURE 3-7: The Raspberry Pi Camera Module.

      At the end of this chapter, we show you how you can check to ensure that your camera is connected correctly and working.

Connecting the camera on a Pi Zero W

      The Pi Zero W camera socket uses a different width of cable to the main Raspberry Pi boards. You can buy the cable separately, or get it with the official Pi Zero case.

      The camera and the Pi board have similar sockets for the cable. You press the connector between your thumb and finger and gently pull to open the connector. The parts don't separate, but there's enough of a gap to remove and insert the cable. On the Raspberry Pi, the camera connector is on the right of the board. (Refer to Figure 3-3.)

      On the camera, insert the cable with the shiny contacts facing the camera front, and then press the socket closed again. On the Raspberry Pi Zero W, insert the cable with the shiny contacts facing the bottom of the board (the flat side). When the cable is flat, the camera will be facing down, but you can bend the cable so that the camera sits on top of the board and faces up. One of the covers for the official Pi Zero case has a hole in it for the camera lens.

Connecting the camera on other Raspberry Pi models

      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.

image

       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.

      tip We assume here that you’re using a monitor or TV, but there is also an official Raspberry Pi touchscreen that connects using the Display socket on the left of the board (not available on the Pi Zero or Zero W).

Connecting an HDMI or DVI display

      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

Скачать книгу