Raspberry Pi For Dummies. Sean McManus

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

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

Raspberry Pi For Dummies - Sean McManus

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

only available as part of a kit there. Shops often bundle the Raspberry Pi with other items you need to use it. It can be convenient to get everything at once, but it might not represent the cheapest way to get started.

      The creators of Raspberry Pi have stripped costs to the bone to enable you to own a fully featured computer for less than $35, so you’ll need to scavenge or buy a few other bits and pieces in order to use your Pi. We say scavenge because the things you need are exactly the kind of things many people have lying around their house or garage already, or can easily pick up from friends or neighbors. In particular, if you’re using a Raspberry Pi as your second computer, you probably have most of the peripherals you need.

      

Not all devices are compatible. In particular, incompatible USB hubs, keyboards, and mice can cause problems that are hard to diagnose. USB hubs that feed power back into your Raspberry Pi through the Pi’s USB port (known as backpowering) could potentially cause damage to the Raspberry Pi if they feed in too much power.

      A list of compatible and incompatible devices is maintained at https://elinux.org/RPi_VerifiedPeripherals, and you can check online reviews to see whether others have experienced difficulties using a particular device with the Raspberry Pi.

      

If you’re buying new devices, you can minimize the risk by buying recommended devices from Raspberry Pi retailers.

      The following sections offer a roundup of what else you may need.

      Essentials

      There are a few things that are essential to get your Raspberry Pi up and running:

       Monitor: The Raspberry Pi has a high-definition video feed and uses an HDMI (high-definition multimedia interface) or Micro HDMI connection for it. If your monitor has an HDMI socket, you can connect the Raspberry Pi directly to it. If your monitor does not support HDMI, it probably has a DVI socket, and you can get a simple and cheap converter that enables you to connect an HDMI cable to it. Older VGA (video graphics array) monitors require a device to convert the HDMI signal into a VGA one. If you’re thinking of buying a converter, check online first to see whether it works with the Raspberry Pi. A lot of cheap cables are just cables, when what you need is a device that converts the signal from HDMI format to VGA, not one that just fits into the sockets on the screen and your Raspberry Pi. These converters can be quite expensive, so Gert van Loo has designed a device that uses the Raspberry Pi’s GPIO pins to connect to a VGA monitor. He’s published the design specs so that anyone can build one, and sell it if they want to, too. Take a look at eBay if you need one, and you might well find what you need. For more information, check out https://github.com/fenlogic/vga666. (If your monitor is connected using a blue plug and the connector has three rows of five pins in it, it’s probably a VGA monitor.)

       TV: You can connect your Raspberry Pi to a high-definition TV using the HDMI socket and should experience a crisp picture. If you have an old television in the garage, you can also press it into service for your Raspberry Pi. The Pi can send a composite video signal, so it can use a TV as its display. When we tried this, it worked but the text lacked definition, which made it difficult to read. You’ll need to get a cable with the right connector to fit your Pi: The original Model A and Model B have a dedicated RCA video socket, but current models use the headphone socket for RCA video output, too.

       USB keyboard and mouse: The Raspberry Pi only supports wired USB keyboards and mice. If you’re still using ones with PS/2 connectors (round rather than flat), you may be able to use a PS/2 to USB adapter. Official Raspberry Pi keyboards and mice are available with an attractive white and red design. You can use Bluetooth devices, but you’ll need to use a wired keyboard and mouse to set them up. When the Raspberry Pi behaves unpredictably, it can be because the keyboard is drawing too much power, so avoid keyboards with too many flashing lights and features.

       SD card or microSD card: The Raspberry Pi doesn’t have a hard drive built into it, so it uses a microSD card (current models) or SD card (older models, earlier than the Model B+) as its main storage. You probably have some SD cards that you use for your digital camera, although you might need to get a higher-capacity one. We recommend a 16GB card as a minimum for Raspberry Pi OS, but you can use a 4GB card if you use a media center operating system (OS) like LibreELEC (see Chapter 8 for a guide to LibreELEC). SD and microSD cards have different class numbers that indicate how fast you can copy information to and from them. You will be fine with a Class 6 or higher. If you buy an official Raspberry Pi kit, it includes a microSD card with Raspberry Pi OS already installed on it.Note: In this book, when we say microSD card, we also mean SD card if that’s what you’re using. If we’re talking about something that’s different for SD cards, we tell you.

       SD or microSD card writer: Many PCs today have a slot for SD or microSD cards, so you can easily copy photos from your camera to your computer. If yours doesn’t, you might want to consider getting an SD or microSD card writer to connect to your computer. You can use it to copy software to an SD card for use with your Raspberry Pi, but you won’t be able to use it to copy files from your Raspberry Pi to a Windows computer. You can also use the card writer to create a backup copy of your Raspberry Pi’s files and software. (You can read about making back-ups in Chapter 4.)

       Power supply: To power your Raspberry Pi, you need to use a 5V power supply. The Raspberry Pi 4 and Raspberry Pi 400 use a USB-C connector, and earlier models use a USB-C Micro USB connector. Although you may have mobile phone and tablet chargers that fit, many of them can’t deliver enough current (up to 2,500 milliamperes for a Raspberry Pi 3 Model A+, and up to 3,000 milliamperes for Raspberry Pi 4), which can make the Raspberry Pi perform unreliably. It’s worth checking to see whether you have a 5V charger that may do the job (it should say on it how much current it provides), but for best results, we recommend buying a compatible charger from the same company that you buy your Raspberry Pi from. There is an official Raspberry Pi 4 power supply available, which has plug styles for the United States, Canada, United Kingdom, Australia, New Zealand, Europe, India, and China.Don’t try to power the Pi by connecting its power port to the USB port on your PC with a cable, because your computer probably can’t provide enough power for your Pi. You can also power the Pi through the GPIO pins, but you could damage the Raspberry Pi if there is a spike in current or the wrong voltage is applied. If you want to provide power through the GPIO pins, a safer approach is to use a hardware-attached-on-top (HAT) device designed to sit on the GPIO pins and provide the consistent power you need while protecting the Pi underneath. For portable applications, you can power the Raspberry Pi using a battery pack designed for mobile phone charging. The Raspberry Pi Foundation advises that you should only use batteries to power your Raspberry Pi if you know what you’re doing, because there’s a risk of damaging your Raspberry Pi. There is an official Raspberry Pi PoE HAT if you want to power your Pi through an Ethernet cable.For more details on the power requirements of various Raspberry Pi models, consult the FAQ at www.raspberrypi.org/documentation/faqs.

       Cables:

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