Raspberry Pi Cookbook
Edition: First Edition
Publisher: O'Reilly Media
Published: 2014
Format: Ebook
ISBN-13: 9781449365226
Table of contents: title: Preface
pagenum: xi; label: 1
title: Setup and Management
pagenum: 1; label: 1.1
title: Selecting a Model of Raspberry Pi
pagenum: 1; label: 1.2
title: Enclosing a Raspberry Pi
pagenum: 3; label: 1.3
title: Selecting a Power Supply
pagenum: 4; label: 1.4
title: Selecting an Operating System Distribution
pagenum: 5; label: 1.5
title: Writing an SD Card with NOOBS
pagenum: 6; label: 1.6
title: Writing an SD Card Manually (Mac)
pagenum: 9; label: 1.7
title: Writing an SD Card Manually (Windows)
pagenum: 10; label: 1.8
title: Writing an SD Card Manually (Linux)
pagenum: 11; label: 1.9
title: Connecting the System
pagenum: 13; label: 1.10
title: Connecting a DVI or VGA Monitor
pagenum: 14; label: 1.11
title: Using a Composite Video Monitor/TV
pagenum: 14; label: 1.12
title: Using All the Storage on the SD Card
pagenum: 16; label: 1.13
title: Adjusting the Picture Size on Your Monitor
pagenum: 17; label: 1.14
title: Maximizing Performance
pagenum: 19; label: 1.15
title: Changing Your Password
pagenum: 21; label: 1.16
title: Setting the Pi to Boot Straight into a Windowing System
pagenum: 22; label: 1.17
title: Shutting Down Your Raspberry Pi
pagenum: 23; label: 1.18
title: Installing the Raspberry Pi Camera Module
pagenum: 25; label: 2
title: Networking
pagenum: 31; label: 2.1
title: Connecting to a Wired Network
pagenum: 31; label: 2.2
title: Finding Out Your IP Address
pagenum: 33; label: 2.3
title: Setting a Static IP Address
pagenum: 35; label: 2.4
title: Setting the Network Name of a Raspberry Pi
pagenum: 36; label: 2.5
title: Setting Up a Wireless Connection
pagenum: 37; label: 2.6
title: Connecting with a Console Lead
pagenum: 38; label: 2.7
title: Controlling the Pi Remotely with SSH
pagenum: 40; label: 2.8
title: Controlling the Pi Remotely with VNC
pagenum: 42; label: 2.9
title: File Sharing on a Mac Network
pagenum: 44; label: 2.10
title: Sharing the Pi Screen on a Mac
pagenum: 45; label: 2.11
title: Using a Raspberry Pi for Network Attached Storage
pagenum: 47; label: 2.12
title: Network Printing
pagenum: 49; label: 3
title: Operating System
pagenum: 53; label: 3.1
title: Moving Files Around Graphically
pagenum: 53; label: 3.2
title: Starting a Terminal Session
pagenum: 55; label: 3.3
title: Navigating the Filesystem Using a Terminal
pagenum: 56; label: 3.4
title: Copying a File or Folder
pagenum: 60; label: 3.5
title: Renaming a File or Folder
pagenum: 61; label: 3.6
title: Editing a File
pagenum: 61; label: 3.7
title: Viewing the Contents of a File
pagenum: 64; label: 3.8
title: Creating a File Without Using an Editor
pagenum: 64; label: 3.9
title: Creating a Directory
pagenum: 65; label: 3.10
title: Deleting a File or Directory
pagenum: 66; label: 3.11
title: Performing Tasks with Superuser Privileges
pagenum: 67; label: 3.12
title: Understanding File Permissions
pagenum: 68; label: 3.13
title: Changing File Permissions
pagenum: 69; label: 3.14
title: Changing File Ownership
pagenum: 70; label: 3.15
title: Making a Screen Capture
pagenum: 71; label: 3.16
title: Installing Software with apt-get
pagenum: 72; label: 3.17
title: Removing Software Installed with apt-get
pagenum: 73; label: 3.18
title: Fetching Files from the Command Line
pagenum: 74; label: 3.19
title: Fetching Source Code with git
pagenum: 75; label: 3.20
title: Running a Program or Script Automatically on Startup
pagenum: 76; label: 3.21
title: Running a Program or Script Automatically at Regular Intervals
pagenum: 78; label: 3.22
title: Finding Things
pagenum: 79; label: 3.23
title: Using the Command-Line History
pagenum: 80; label: 3.24
title: Monitoring Processor Activity
pagenum: 81; label: 3.25
title: Working with File Archives
pagenum: 83; label: 3.26
title: Listing Connected USB Devices
pagenum: 84; label: 3.27
title: Redirecting Output from the Command Line to a File
pagenum: 84; label: 3.28
title: Concatenating Files
pagenum: 85; label: 3.29
title: Using Pipes
pagenum: 86; label: 3.30
title: Hiding Output to the Terminal
pagenum: 86; label: 3.31
title: Running Programs in the Background
pagenum: 87; label: 3.32
title: Creating Command Aliases
pagenum: 88; label: 3.33
title: Setting the Date and Time
pagenum: 88; label: 3.34
title: Finding Out How Much Room You Have on the SD Card
pagenum: 89; label: 4
title: Software
pagenum: 91; label: 4.1
title: Making a Media Center
pagenum: 91; label: 4.2
title: Installing Office Software
pagenum: 94; label: 4.3
title: Installing Other Browsers
pagenum: 95; label: 4.4
title: Using the Pi Store
pagenum: 97; label: 4.5
title: Making a Webcam Server
pagenum: 99; label: 4.6
title: Running a Vintage Game Console Emulator
pagenum: 101; label: 4.7
title: Running Minecraft
pagenum: 103; label: 4.8
title: Running Open Arena
pagenum: 104; label: 4.9
title: Raspberry Pi Radio Transmitter
pagenum: 105; label: 4.10
title: Running GIMP
pagenum: 107; label: 4.11
title: Internet Radio
pagenum: 108; label: 5
title: Python Basics
pagenum: 111; label: 5.1
title: Deciding Between Python 2 and Python 3
pagenum: 111; label: 5.2
title: Editing Python Programs with IDLE
pagenum: 112; label: 5.3
title: Using the Python Console
pagenum: 114; label: 5.4
title: Running Python Programs from the Terminal
pagenum: 115; label: 5.5
title: Variables
pagenum: 116; label: 5.6
title: Displaying Output
pagenum: 116; label: 5.7
title: Reading User Input
pagenum: 117; label: 5.8
title: Arithmetic
pagenum: 118; label: 5.9
title: Creating Strings
pagenum: 118; label: 5.10
title: Concatenating (Joining) Strings
pagenum: 119; label: 5.11
title: Converting Numbers to Strings
pagenum: 120; label: 5.12
title: Converting Strings to Numbers
pagenum: 121; label: 5.13
title: Find the Length of a String
pagenum: 122; label: 5.14
title: Find the Position of One String Inside Another
pagenum: 122; label: 5.15
title: Extracting Part of a String
pagenum: 123; label: 5.16
title: Replacing One String of Characters with Another Inside a String
pagenum: 124; label: 5.17
title: Converting a String to Upper- or Lowercase
pagenum: 125; label: 5.18
title: Running Commands Conditionally
pagenum: 126; label: 5.19
title: Comparing Values
pagenum: 127; label: 5.20
title: Logical Operators
pagenum: 128; label: 5.21
title: Repeating Instructions an Exact Number of Times
pagenum: 129; label: 5.22
title: Repeating Instructions Until Some Condition Changes
pagenum: 130; label: 5.23
title: Breaking Out of a Loop
pagenum: 130; label: 5.24
title: Defining a Function in Python
pagenum: 131; label: 6
title: Python Lists and Dictionaries
pagenum: 135; label: 6.1
title: Creating a List
pagenum: 135; label: 6.2
title: Accessing Elements of a List
pagenum: 136; label: 6.3
title: Find the Length of a List
pagenum: 137; label: 6.4
title: Adding Elements to a List
pagenum: 137; label: 6.5
title: Removing Elements from a List
pagenum: 138; label: 6.6
title: Creating a List by Parsing a String
pagenum: 139; label: 6.7
title: Iterating over a List
pagenum: 139; label: 6.8
title: Enumerating a List
pagenum: 140; label: 6.9
title: Sorting a List
pagenum: 141; label: 6.10
title: Cutting Up a List
pagenum: 142; label: 6.11
title: Applying a Function to a List
pagenum: 143; label: 6.12
title: Creating a Dictionary
pagenum: 144; label: 6.13
title: Accessing a Dictionary
pagenum: 145; label: 6.14
title: Removing Things from a Dictionary
pagenum: 146; label: 6.15
title: Iterating over Dictionaries
pagenum: 147; label: 7
title: Advanced Python
pagenum: 149; label: 7.1
title: Formatting Numbers
pagenum: 149; label: 7.2
title: Formatting Dates
pagenum: 150; label: 7.3
title: Returning More Than One Value
pagenum: 151; label: 7.4
title: Defining a Class
pagenum: 151; label: 7.5
title: Defining a Method
pagenum: 153; label: 7.6
title: Inheritance
pagenum: 154; label: 7.7
title: Writing to a File
pagenum: 155; label: 7.8
title: Reading from a File
pagenum: 156; label: 7.9
title: Pickling
pagenum: 157; label: 7.10
title: Handling Exceptions
pagenum: 158; label: 7.11
title: Using Modules
pagenum: 159; label: 7.12
title: Random Numbers
pagenum: 160; label: 7.13
title: Making Web Requests from Python
pagenum: 161; label: 7.14
title: Command-Line Arguments in Python
pagenum: 162; label: 7.15
title: Sending Email from Python
pagenum: 163; label: 7.16
title: Writing a Simple Web Server in Python
pagenum: 164; label: 8
title: GPIO Basics
pagenum: 167; label: 8.1
title: Finding Your Way Around the GPIO Connector
pagenum: 167; label: 8.2
title: Keeping Your Raspberry Pi Safe when Using the GPIO Connector
pagenum: 169; label: 8.3
title: Installing RPi.GPIO
pagenum: 169; label: 8.4
title: Setting Up I2C
pagenum: 170; label: 8.5
title: Using I2C Tools
pagenum: 172; label: 8.6
title: Setting Up SPI
pagenum: 173; label: 8.7
title: Freeing the Serial Port
pagenum: 174; label: 8.8
title: Installing PySerial for Access to the Serial Port from Python
pagenum: 175; label: 8.9
title: Installing Minicom to Test the Serial Port
pagenum: 176; label: 8.10
title: Using a Breadboard with Jumper Leads
pagenum: 178; label: 8.11
title: Using a Breadboard with a Pi Cobbler
pagenum: 179; label: 8.12
title: Converting 5V Signals to 3.3V with Two Resistors
pagenum: 179; label: 8.13
title: Converting 5V Signals to 3.3V with a Level Converter Module
pagenum: 181; label: 8.14
title: Powering a Raspberry Pi with Batteries
pagenum: 183; label: 8.15
title: Powering a Raspberry Pi with a LiPo Battery
pagenum: 184; label: 8.16
title: Getting Started with a PiFace Digital Interface Board
pagenum: 185; label: 8.17
title: Getting Started with a Gertboard
pagenum: 189; label: 8.18
title: Getting Started with a RaspiRobot Board
pagenum: 191; label: 8.19
title: Using a Humble Pi Prototyping Board
pagenum: 194; label: 8.20
title: Using a Pi Plate Prototyping Board
pagenum: 195; label: 8.21
title: Using a Paddle Terminal Breakout Board
pagenum: 197; label: 9
title: Controlling Hardware
pagenum: 203; label: 9.1
title: Connecting an LED
pagenum: 203; label: 9.2
title: Controlling the Brightness of an LED
pagenum: 206; label: 9.3
title: Make a Buzzing Sound
pagenum: 208; label: 9.4
title: Switching a High-Power DC Device Using a Transistor
pagenum: 210; label: 9.5
title: Switching a High-Power Device Using a Relay
pagenum: 212; label: 9.6
title: Controlling High-Voltage AC Devices
pagenum: 215; label: 9.7
title: Making a User Interface to Turn Things On and Off
pagenum: 216; label: 9.8
title: Making a User Interface to Control PWM Power for LEDs and Motors
pagenum: 218; label: 9.9
title: Changing the Color of an RGB LED
pagenum: 220; label: 9.10
title: Using Lots of LEDs (Charlieplexing)
pagenum: 223; label: 9.11
title: Using an Analog Meter as a Display
pagenum: 227; label: 9.12
title: Programming with Interrupts
pagenum: 229; label: 9.13
title: Controlling GPIO Outputs Using a Web Interface
pagenum: 232; label: 10
title: Motors
pagenum: 237; label: 10.1
title: Controlling Servo Motors
pagenum: 237; label: 10.2
title: Controlling a Large Number of Servo Motors
pagenum: 241; label: 10.3
title: Controlling the Speed of a DC Motor
pagenum: 244; label: 10.4
title: Controlling the Direction of a DC Motor
pagenum: 246; label: 10.5
title: Using a Unipolar Stepper Motor
pagenum: 252; label: 10.6
title: Using a Bipolar Stepper Motor
pagenum: 256; label: 10.7
title: Using a RaspiRobot Board to Drive a Bipolar Stepper Motor
pagenum: 257; label: 10.8
title: Building a Simple Robot Rover
pagenum: 260; label: 11
title: Digital Inputs
pagenum: 265; label: 11.1
title: Connecting a Push Switch
pagenum: 265; label: 11.2
title: Toggling with a Push Switch
pagenum: 268; label: 11.3
title: Using a Two-Position Toggle or Slide Switch
pagenum: 270; label: 11.4
title: Using a Center-Off Toggle or Slide Switch
pagenum: 271; label: 11.5
title: Debouncing a Button Press
pagenum: 274; label: 11.6
title: Using an External Pull-up Resistor
pagenum: 276; label: 11.7
title: Using a Rotary (Quadrature) Encoder
pagenum: 278; label: 11.8
title: Using a Keypad
pagenum: 281; label: 11.9
title: Detecting Movement
pagenum: 284; label: 11.10
title: Adding GPS to the Raspberry Pi
pagenum: 286; label: 11.11
title: Intercepting Keypresses
pagenum: 290; label: 11.12
title: Intercepting Mouse Movements
pagenum: 291; label: 11.13
title: Using a Real-Time Clock Module
pagenum: 293; label: 12
title: Sensors
pagenum: 299; label: 12.1
title: Using Resistive Sensors
pagenum: 299; label: 12.2
title: Measuring Light
pagenum: 304; label: 12.3
title: Detecting Methane
pagenum: 305; label: 12.4
title: Measuring a Voltage
pagenum: 308; label: 12.5
title: Reducing Voltages for Measurement
pagenum: 310; label: 12.6
title: Using Resistive Sensors with an ADC
pagenum: 313; label: 12.7
title: Measuring Temperature with an ADC
pagenum: 315; label: 12.8
title: Measuring Acceleration
pagenum: 317; label: 12.9
title: Measuring Temperature Using a Digital Sensor
pagenum: 320; label: 12.10
title: Measuring Distance
pagenum: 323; label: 12.11
title: Displaying Sensor Values
pagenum: 326; label: 12.12
title: Logging to a USB Flash Drive
pagenum: 327; label: 13
title: Displays
pagenum: 331; label: 13.1
title: Using a Four-Digit LED Display
pagenum: 331; label: 13.2
title: Displaying Messages on an I2C LED Matrix
pagenum: 334; label: 13.3
title: Using Pi-Lite
pagenum: 336; label: 13.4
title: Displaying Messages on an Alphanumeric LCD
pagenum: 339; label: 14
title: Arduino and Raspberry Pi
pagenum: 343; label: 14.1
title: Programming an Arduino from Raspberry Pi
pagenum: 344; label: 14.2
title: Communicating with the Arduino by Using the Serial Monitor
pagenum: 347; label: 14.3
title: Setting Up PyFirmata to Control an Arduino from a Raspberry Pi
pagenum: 349; label: 14.4
title: Writing Digital Outputs on an Arduino from a Raspberry Pi
pagenum: 351; label: 14.5
title: Using PyFirmata with TTL Serial
pagenum: 353; label: 14.6
title: Reading Arduino Digital Inputs Using PyFirmata
pagenum: 355; label: 14.7
title: Reading Arduino Analog Inputs Using PyFirmata
pagenum: 358; label: 14.8
title: Analog Outputs (PWM) with PyFirmata
pagenum: 360; label: 14.9
title: Controlling a Servo Using PyFirmata
pagenum: 362; label: 14.10
title: Custom Communication with an Arduino over TTL Serial
pagenum: 364; label: 14.11
title: Custom Communication with an Arduino over I2C
pagenum: 368; label: 14.12
title: Using Small Arduinos with a Raspberry Pi
pagenum: 372; label: 14.13
title: Getting Started with an aLaMode Board and a Raspberry Pi
pagenum: 373; label: 14.14
title: Using an Arduino Shield with an aLaMode Board and a Raspberry Pi
pagenum: 377; label: 14.15
title: Using Gertboard as an Arduino Interface
pagenum: 378; label: A
title: Parts and Suppliers
pagenum: 381; title: Index
pagenum: 387