Cover of the summary of “Raspberry Pi User Guide”

Book summary “Raspberry Pi User Guide”: summary

Eben Upton

3,337 words · 19 min read

Modern computers have transformed you into a passive consumer rather than a creator. You use closed devices that hide their inner workings and discourage tinkering.

Summary text

3,337 words · 19 min read

Introduction

Modern computers have transformed you into a passive consumer rather than a creator. You use closed devices that hide their inner workings and discourage tinkering.

Eben Upton addresses this educational computing crisis by introducing the Raspberry Pi, a cheap, credit-card-sized computer designed to spark interest in hardware and programming.

The book guides you through setting up your board, mastering Linux administration, and writing code in Scratch and Python. You also learn to hack hardware by connecting real-world electronics to the input-output port.

Reading this book helps you answer questions such as:

  • How do you connect and power your credit-card-sized computer?
  • What commands keep your operating system stable and secure?
  • How do you write programs that control physical lights and sensors?

1. Meet the Raspberry Pi

The Raspberry Pi utilizes an ARM-based system-on-chip architecture and open-source GNU/Linux operating systems to achieve high energy efficiency and total user customisation.

You encounter a credit-card-sized computer designed to spark interest in hardware and programming. Eben Upton and the Raspberry Pi Foundation created the board to revive the programming skills once common in the 1980s.

Board Evolution and Architecture

The Raspberry Pi uses an ARM-based system-on-chip architecture rather than the x86 architecture found in standard personal computers. This design allows you to achieve high energy efficiency and low heat generation.

Because ARM processors utilize a reduced instruction set computing design instead of complex instruction set computing architectures, they consume very little power. You can run the board cool without metal heat sinks while drawing power from a simple 5V micro-USB connection provided via the onboard micro-USB port. Traditional x86 software built for Windows or Mac OS X will not run natively on the Pi.

Unlike closed source mainstream operating systems, the Raspberry Pi relies primarily on open source GNU/Linux distributions. You gain total visibility and freedom to modify the underlying source code.

  • Operating systems such as Raspbian, Arch Linux, and specialized embedded versions are structured around the open source ethos.
  • You can examine and alter every component of the operating system code.
  • Software designed exclusively for closed platforms like Windows or OS X is generally incompatible unless appropriate open source alternatives are used.

The Raspberry Pi family encompasses several distinct mainstream and specialized board variations. These revisions differ in processor capability, physical dimensions, memory capacity, and integrated connectivity features.

  • The base Model A features 256 MB of RAM.
  • The Model B+ and Pi Zero include 512 MB of RAM.
  • The Raspberry Pi 2 and 3 include 1 GB of RAM.
  • The Raspberry Pi 3 supports 2.4 GHz Wi-Fi networks.

The lineup ranges from early legacy boards to updated revisions featuring a standard 40-pin header on the Model A+ and Model B+. You also find multi-core performance upgrades on the Raspberry Pi 2 and the 64-bit Raspberry Pi 3 with built-in Wi-Fi and Bluetooth. Specialized options include the ultra-compact, budget-focused Raspberry Pi Zero and the industrial Compute Module.

Physical computing allows you to interface general-purpose computers directly with real-world hardware components like sensors, motors, and lights. You use exposed hardware headers such as the General Purpose Input/Output port, Camera Serial Interface, Display Serial Interface, and Hardware Attached on Top boards.

An active global online community and official publications like The MagPi support these projects. A total of 300,000 Pis are manufactured every month, while the official online forum reaches 170,000 members.

The Boreatton Scouts in the UK built the world's first robot controlled by Scouting brain waves using an electroencephalography headset linked to a Raspberry Pi.

Community projects range from an Australian school meteor-tracking project and a family building a robot vacuum cleaner to sending Raspberry Pis into near-earth orbit on rockets and balloons.

2. Getting Started with the Hardware

Connecting peripherals and power supplies requires careful hardware selection because the Pi demands high electrical current and lacks legacy ports.

Older PS/2 connectors are unsupported and require USB equivalents or adapters. Models A and A+ or Zero need USB hubs or OTG adapters. Furthermore, standard smartphone chargers providing only 500mA are insufficient for power-hungry models like the Pi 3, which can require up to 2A. A powered USB hub requires a minimum power supply rating of 1A to safely power the Pi through its USB lead.

The Raspberry Pi uses a micro-SD memory card as a solid-state boot drive in place of a traditional hard drive. Because the micro-SD card holds the entire operating system, it requires a capacity of at least 8GB. Additional external storage can be attached via USB mass storage devices. Large micro-SD cards available on the market reach a maximum capacity of 256GB.

The Pi provides composite video for older CRT televisions via a 3.5mm AV jack, high-definition digital HDMI video for modern monitors and HDTVs, and a DSI ribbon connector for flat-panel mobile displays like the official touchscreen. The HDMI port supports Full HD resolution of 1920 x 1080.

Network connectivity can be established using built-in ports, onboard wireless radios, or external USB adapters. Models with Ethernet ports feature auto-MDI technology, allowing them to adjust automatically to standard or crossover patch cables. Models lacking onboard networking require USB Ethernet adapters or Wi-Fi dongles supporting Linux. The built-in adapter on the Raspberry Pi 3 supports exclusively the 2.4 GHz frequency. Standard USB Ethernet adapters operate in a two-speed mode of 10/100 MB, while gigabit-class adapters carry the 10/100/1000 designation.

Software Installation and NOOBS

The New Out-Of-Box Software tool simplifies operating system installation and configuration for beginners.

NOOBS comes preloaded on bundled micro-SD cards or can be downloaded as a Zip archive. You extract the files to a freshly formatted micro-SD card, boot the Pi, and select your preferred operating system from an intuitive menu. If your monthly internet data cap threshold is below 1GB, you should buy a preloaded SD card instead of downloading NOOBS. When multiple systems are installed, you have a 10 seconds time window before the default operating system boots automatically.

  • Insert the micro-SD card into an existing computer card reader.
  • Format the SD card using the SD Card Association's formatting tool if it was previously used with another device.
  • Extract the downloaded NOOBS Zip archive contents directly onto the micro-SD card.
  • Eject the card safely from the computer and insert it into the Pi's micro-SD card slot.
  • Connect power to launch the NOOBS menu, select the operating system by clicking its box, and click the Install icon.

Advanced users can manually install operating system distributions by flashing image files directly to the SD card. Manual flashing bypasses NOOBS to allow the use of specific Linux distributions. The process requires downloading a compressed image file, extracting the raw disk image, and writing it using dedicated utility software depending on the host operating system.

  • Download the Linux distribution Zip archive and its .sha1 hash from the Raspberry Pi website.
  • Decompress the archive to retrieve the .img file.
  • Identify the SD card device address using fdisk -l on Linux or diskutil list on OS X.
  • Unmount the SD card if automatically mounted on OS X using diskutil unmountdisk.
  • Execute the dd command with the correct image filename, device address, and block size to write the data.

Because the Raspberry Pi has no physical power button and boots instantly when plugged in, pulling the power plug without warning can damage the micro-SD card file system. You must shut down the system safely via software command before removing power to prevent data corruption.

  • Open the console or terminal in the operating system.
  • Type the shutdown command: sudo shutdown -h now
  • Wait for the activity lights to turn off before disconnecting the power supply.
  • Connect an RJ-45 Ethernet patch cable between the Pi and a network switch, router, or directly to a computer.
  • For wireless setups, plug a compatible USB wireless adapter into a powered USB hub.
  • Turn on the Bluetooth device and activate pairing mode.
  • Click the Bluetooth icon on the Raspbian taskbar and select Add Device.
  • Find the target device in the list and click Pair, then follow the onscreen instructions.

3. Linux System Administration

Linux is fundamentally an open-source kernel handling hardware communication, which is combined with GNU tools and packaged into various distributions. The kernel serves as the heart of the operating system. When combined with GNU tools, it forms GNU/Linux, offering multi-user accounts and security features. Different collections of these open-source projects form flavors known as distributions, allowing unique modifications for specific hardware.

Mastering Linux commands, package management, and safe shutdown procedures ensures your system remains stable and secure.

Raspbian defaults to a restricted user account for safety and a privileged root account for system administration. Users spend most of their time on a restricted user account to prevent accidental system breakage and malware infections. The root account, or superuser, has ultimate administrative privileges.

  • Log in to the Pi using the existing user account with username pi and password raspberry.
  • Type the following as a single line with no spaces after commas: sudo useradd -m -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,netdev,gpio,i2c,spi username
  • To set a password on the new account, type sudo passwd username followed by the new password when prompted.

The Raspberry Pi must always be shut down safely through software commands rather than abruptly pulling the power cable. Because the Pi constantly reads from and writes to the micro-SD card in the background, sudden power loss can corrupt the file system and render the card unreadable.

  • To shut down using the terminal, type sudo shutdown -h now.
  • To shut down from the Raspbian graphical desktop, click the Menu at the upper-left of the screen and click Shutdown.
  • Wait until the screen goes black and the ACT light switches off before removing the power cable.

Managing Software and Filesystems

Linux distributions like Raspbian use package managers such as apt to efficiently install, remove, and upgrade software along with dependencies. Package managers maintain a local cache of available software from online repositories. They automatically resolve and install necessary dependent packages, eliminating manual software installation hurdles.

  • Ensure the apt cache is up-to-date by typing sudo apt-get update.
  • Search for software using apt-cache search followed by a search term, optionally piping through less for long lists.
  • Install software by typing sudo apt-get install package-name.
  • Remove software while keeping configuration files using sudo apt-get remove package-name.
  • Remove software along with configuration files using sudo apt-get purge package-name.
  • Upgrade all system software using sudo apt-get upgrade.

External USB storage devices must be mounted manually from the console in Linux before their contents become accessible. While desktop environments handle USB storage automatically, command-line environments require the user to identify the drive, create a mount point directory, grant permissions, and execute the mount command. The largest available micro-SD card at the time of writing is 256 GB, while the largest full-size desktop hard drives reach 10,000 GB, or 10 TB.

  • Connect the USB storage device to the Pi, either directly or through a connected USB hub.
  • Type sudo fdisk -l to get a list of drives connected to the Pi and find the USB storage device by size, noting the device name as /dev/sdXN.
  • Create a mount point by typing sudo mkdir /media/externaldrive.
  • Make the directory accessible to all users by typing sudo chgrp -R users /media/externaldrive && sudo chmod -R g+w /media/externaldrive.
  • Type sudo mount /dev/sdXN /media/externaldrive -o=rw to mount the USB storage device and gain access to its contents.

4. Programming with Scratch and Python

Scratch provides a visual drag-and-drop environment for beginners, while Python offers an expressive high-level syntax for building interactive games and scripts.

Created in 2006 by the Lifelong Kindergarten group at the MIT Media Lab as an offshoot of Squeak and Smalltalk, Scratch provides a colourful, mouse-driven user interface. Behind the interface lies a powerful programming language featuring multimedia functionality and support for external sensors and motors.

Over five and a half million Scratch projects have been shared by users on the official website, the majority of which are games.

Introduction to Scratch

  • Open Scratch and maximise the window if needed.
  • Change the block palette to Looks mode by clicking the Looks button.
  • Drag the say Hello! block into the middle Scripts area and customise it to read Hello World!
  • Switch to the Control section and drag the when flag clicked trigger block above the say block so they snap together like a jigsaw piece.
  • Click the green flag icon at the top right to run the program and save your work via the File menu.
  • Start a new project and drag the move 10 steps block from the Motion palette to the Scripts area, changing the value to 30.
  • Switch to the Sound palette and link the play sound meow block beneath the move block.
  • Add a wait 1 secs block from the Control palette beneath the sound block.
  • Add another move block modified to read move -30 steps beneath the wait block.
  • Place a when flag clicked block at the top of the stack and connect a forever block if an infinite loop is desired.

Transitioning to Python

Python is a high-level, open-source programming language recommended by the Raspberry Pi Foundation for beginners transitioning from Scratch. Developed by Guido van Rossum in the late 1980s as a successor to ABC, Python features a clear, expressive syntax that uses recognizable English commands.

  • Open Python 2 (IDLE) from the Programming menu.
  • Click File and choose New File to open a blank file.
  • Begin the program with the shebang line #!/usr/bin/env python.
  • Add the print statement print "Hello, World!"
  • Save the file as helloworld.py and run it by pressing F5 or choosing Run Module.

5. Learning to Hack Hardware

The General Purpose Input/Output port bridges programming with real-world electronics, allowing you to control sensors, motors, and lights using Python scripts.

The Raspberry Pi features a general-purpose input-output GPIO port that allows it to act as an electronic controller for sensors, motors, and other circuits. Unlike a standard PC, the Pi's GPIO port enables physical computing by sending or receiving binary signals and communicating via protocols like SPI and I2C. The internal logic operates at 3.3V, while the incoming power socket supplies 5V.

Building physical circuits for the Raspberry Pi requires basic prototyping tools like a breadboard, jumper wires, resistors, push-buttons, and low-power LEDs. Breadboards allow solderless prototyping using a 2.54 mm grid of contacts. Solid-core wire is preferred for breadboards, and resistors are required to limit current and protect components like LEDs from burning out.

Python scripts can control Raspberry Pi GPIO output pins to drive external components like LEDs by utilizing the RPi.GPIO library. Pins must be initialized in board mode as outputs, after which boolean high and low states toggle power supply voltage. A limiting resistor calculated using forward voltage and current formulas protects the LED.

Using a 3.3V supply with an LED requiring 1.7V and 25mA yields a required limiting resistor of 64 ohms, rounded up to the common 68-ohm value.

  • Import the RPi.GPIO and time libraries into your Python script.
  • Set the GPIO library mode to board numbering using GPIO.setmode(GPIO.BOARD).
  • Configure the target pin as an output using GPIO.setup(pin, GPIO.OUT).
  • Create an infinite loop using while True: to cycle the pin state.
  • Turn the pin on with GPIO.output(pin, True), pause using time.sleep(), turn it off with GPIO.output(pin, False), and pause again.

Python programs can read button presses and sensor states from GPIO input pins configured with pull-up resistors to prevent floating states. A pull-up resistor connected to a 3.3V reference voltage keeps an input pin constantly high until a push-button grounds the circuit to low. An embedded loop ensures Python waits for button release to avoid repetitive triggers.

  • Import the RPi.GPIO library and set board mode with GPIO.setmode(GPIO.BOARD).
  • Configure the input pin using GPIO.setup(pin, GPIO.IN).
  • Create an infinite loop using while True: to constantly monitor input status.
  • Store the pin reading in a variable using input_value = GPIO.input(pin).
  • Add an evaluation statement to detect when input_value == False and execute your response code.

GPIO Port and Camera Module

The Raspberry Pi Camera Module connects directly to the dedicated Camera Serial Interface port, offering a compact, low-power solution for capturing high-resolution photos and video. The Camera Module is built around an 8-megapixel smartphone sensor and works with the Pi's graphics processor to handle high-resolution video and stills smoothly without overloading the main CPU or draining excessive power.

Projects using the module range from simple home security systems and face tracking to near-space photography via weather balloons.

Installing the Camera Module requires precise handling of the ribbon cable and raising the lugs on the CSI connector. The bare circuit board connects via a semi-rigid ribbon cable to the CSI connector, transferring data and power. The user must lift the plastic lugs by a couple of millimeters, insert the cable with silver contacts facing left and the blue part right, and lower the lugs to secure it.

  • Lift the small lugs on either side of the CSI connector gently with your fingernails by a couple of millimetres.
  • Insert the free end of the ribbon cable into the CSI port with the silver contacts facing left and the blue portion to the right.
  • Push the lugs back down to secure the cable in place.
  • Peel off the small protective piece of plastic film found over the lens.

Raspberry Pi provides dedicated command-line utilities, raspistill and raspivid, to capture still images and H.264 video respectively. The raspistill tool offers a 5-second live preview by default and saves files in JPEG format, with options for custom encoding, resolution, and timeout. The raspivid tool records video using hardware acceleration and restricts output to the H.264 format because the camera module lacks an onboard microphone.

  • Type raspistill -o testcapture.jpg at the console to capture a still image.
  • Type raspivid -o testvideo.h264 at the console to record a short video.

Conclusion

Hardware setup, Linux administration, programming languages, and physical computing combine to form a complete toolkit for digital creation. You can transition from a basic desktop consumer to an active hardware maker by integrating these domains. The system-on-chip architecture, command-line management, software development environments, and GPIO header operate as a unified ecosystem. You take full control over your computational environment when you master all these layers together.

  1. Verify your power supply ratings before connecting peripherals to prevent voltage drops and system instability.
  2. Shut down your operating system safely through the terminal or desktop menu to protect file systems from corruption.
  3. Choose Scratch for visual logic development and transition to Python for scalable scripting and hardware control.
  4. Double-check your circuit wiring and resistor values before sending electrical signals through the GPIO pins.
  5. Back up your secure digital cards regularly to preserve your customized configurations and project files.

10 Key Ideas

  1. Eben Upton addresses the modern educational computing crisis by introducing the Raspberry Pi, a cheap, credit-card-sized computer designed to spark interest in hardware and programming.
  2. The Raspberry Pi uses an ARM-based system-on-chip architecture rather than x86 to achieve high energy efficiency, low heat generation, and low power consumption.
  3. The Raspberry Pi relies primarily on open-source GNU/Linux distributions to give users total visibility and freedom to modify the underlying source code.
  4. Connecting peripherals and power supplies requires careful hardware selection because the Pi demands high electrical current, lacks legacy ports, and requires sufficient amperage from power sources.
  5. The New Out-Of-Box Software tool simplifies operating system installation and configuration for beginners by providing an intuitive menu on preloaded or custom micro-SD cards.
  6. Linux distributions like Raspbian use package managers such as apt to efficiently install, remove, and upgrade software along with their dependencies.
  7. The Raspberry Pi must always be shut down safely through software commands rather than abruptly pulling the power cable to prevent file system corruption on the micro-SD card.
  8. Scratch provides a colourful, mouse-driven visual drag-and-drop environment for beginners alongside multimedia functionality and support for external sensors and motors.
  9. Python features a clear, expressive syntax that uses recognizable English commands, making it ideal for building interactive scripts and games after transitioning from Scratch.
  10. The General Purpose Input/Output port bridges programming with real-world electronics, allowing Python scripts to control sensors, motors, and lights using physical computing circuits.

A summary is an independent retelling, not the text of the book.

Cover of the summary of “The Last Whalers” 20 min read

The Last Whalers

Doug Bock Clark
Cover of the summary of “Confess” 21 min read

Confess

Rob Halford
Cover of the summary of “Toast” 17 min read

Toast

Nigel Slater
Cover of the summary of “Ace Voices” 24 min read

Ace Voices

Eris Young
Cover of the summary of “For Small Creatures Such as We” 17 min read
Cover of the summary of “Two Trees Make a Forest” 16 min read
Cover of the selected audiobook Choose a chapter The player is ready
0:00 0:00

Volume