Raspberry Pi For Dummies. Sean McManus. Читать онлайн. Newlib. NEWLIB.NET

Автор: Sean McManus
Издательство: John Wiley & Sons Limited
Серия:
Жанр произведения: Компьютерное Железо
Год издания: 0
isbn: 9781119796879
Скачать книгу
and spreadsheets (see Chapter 6), or for editing photos (see Chapter 7). You can use it for playing back music or video (see Chapter 8) or for playing games (see Chapter 19). You can use the built-in software to write your own music, too (see Chapter 14). It’s the perfect tool for homework, but it’s also a useful computer for writing letters, managing your accounts, and paying bills online.

      The Raspberry Pi is at its best, however, when it’s being used to learn how computers work, and how you can create your own programs or electronics projects using them. It comes with Scratch (see Chapter 9), a visual programming language that enables people of all ages to create their own animations and games while learning some of the core concepts of computer programming along the way.

      It also comes with Python (see Chapter 11), a professional programming language used by YouTube, Google, and Industrial Light & Magic (the special effects gurus for the Star Wars films), among many others.

      It has GPIO pins on it that you can use to connect up your own circuits to the Raspberry Pi, so you can use your Raspberry Pi to control other devices and to receive and interpret signals from them. In Part 5, we show you how to build some electronic projects controlled by the Raspberry Pi. In Chapter 21, we show you some add-ons you can connect to the GPIO pins.

      One of the great things about the Raspberry Pi is that it’s established a community of businesses that have created products for it, or have shared in its success by selling it. You can now buy the Raspberry Pi from a wide range of electronics companies for hobbyists. Global retailers include Pimoroni (www.pimoroni.com), The Pi Hut (https://thepihut.com), and Adafruit (www.adafruit.com). It’s also available from the Raspberry Pi’s distributors, RS Components (www.rs-components.com) and Element14 (www.element14.com).

      You might also be able to buy it from your local computer or electronics store, although you’ll probably find it’s 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