0%

Book Description

Design and build your own hardware projects that interact with the real world using the Raspberry Pi

In Detail

The Raspberry Pi is one of the cheapest and most popular single-board computers, as such it has become a platform for users to create their own interesting hardware and software projects. It's capable of doing everything you'd expect a desktop computer to do, from browsing the Internet and playing high-definition videos, to making spreadsheets, word processing, and playing games.

Filled with 10 interesting hardware projects, this book starts off by helping you get your Raspberry Pi set up with the popular Raspbian operating system, writing Python scripts, and interacting with some external hardware. As you progress through the next set of projects, you are introduced to additional pieces of software and will write scripts that bridge the gap between them and various sensors and hardware.

By the end of the book, you will be writing full Python applications that will both interface with a wide variety of hardware and be exposed to the Internet.

What You Will Learn

  • Install and configure an operating system on your Raspberry Pi
  • Design electronics circuits using a range of standard components
  • Interact with electronic circuits and hardware using software libraries
  • Write efficient Python applications to control hardware and process data
  • Build professional-quality enclosures using a range of construction methods
  • Implement best practices to be able to power your projects while on the go
  • Configure Linux to run your applications at specific times
  • Make your applications interact with online data and communication services

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of Contents

  1. Raspberry Pi Blueprints
    1. Table of Contents
    2. Raspberry Pi Blueprints
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Downloading the color images of this book
        3. Errata
        4. Piracy
        5. Questions
    8. 1. Raspberry Pi Pirate Radio
      1. What you will need
      2. Setting up the Pi
        1. Choosing a Linux distribution
        2. Writing an SD card
          1. Windows
          2. Linux and Mac OS
        3. Booting the Pi for the first time
          1. Network scanning
        4. Connecting to the Pi via SSH
          1. Common Linux commands
        5. The initial setup
      3. Setting up the pirate radio
        1. Transferring MP3 files to the Pi
      4. Scripting a media player
        1. Calling PiFM from Python
        2. Searching for MP3 files
        3. Getting input from a command line
        4. Queuing the media files to be played
        5. Using the media player script
      5. Summary
    9. 2. Portable Speaker System
      1. What you will need
      2. Tools you will need
      3. Setting up Logitech Media Server
      4. Setting up the Pi as a Squeezebox client
        1. Setting up Wi-Fi on the Pi
        2. Running squeezelite as a daemon
      5. Building the electronics
        1. The amplifier circuit
        2. Running the speaker system on battery power
      6. Building the enclosure for the speaker system
      7. Running Logitech Media Server on the Pi
        1. Creating a backup image of an SD card
        2. Automounting a USB storage device
        3. Installing Logitech Media Server
        4. Setting up the Pi as a Wi-Fi access point
      8. Summary
    10. 3. Mini Retro Arcade Cabinet
      1. Requirements
      2. Setting up the input electronics
      3. Building the cabinet
      4. Setting up PiPlay
      5. Using the buttons and joystick with PiPlay
      6. Summary
    11. 4. GPS-enabled Time-lapse Recorder
      1. What you will need
      2. Setting up the hardware
        1. The camera board
          1. Connecting the camera module to the Pi
          2. Setting up the Raspberry Pi camera
        2. The GPS module
      3. Setting up the capture software
      4. Using the captures
        1. Creating a time-lapse video
        2. Exporting GPS data as CSV
      5. Summary
    12. 5. Home Theater PC
      1. What you will need
      2. Setting up OpenELEC
        1. The first boot and initial setup
        2. Connecting the Pi to a wireless network
        3. Uploading media files to the Pi
          1. Windows
          2. Linux
        4. Shutting down the Pi
      3. Setting up the LCD
      4. Setting up the switches
      5. Final assembly
      6. Summary
    13. 6. Outdoor Weather Station
      1. What you will need
      2. Reverse engineering the Maplin sensors
        1. Understanding the sensors
        2. Wiring
        3. Setting up your Arduino
      3. Setting up the remaining sensors
        1. DHT11/22
        2. BMP180
      4. The weather station web application
        1. Deploying the app on the Pi
      5. Taking readings from the sensors
      6. Assembling the weather station
      7. Using the web application
      8. Summary
    14. 7. Home Security System
      1. What you will need
      2. The security system structure
        1. Designing your security system
      3. Web applications
        1. Deploying our application
        2. Configuring sensors and alarms
      4. Interfacing sensors
        1. The PIR motion sensors
        2. Magnetic door sensors
      5. The RF network
        1. Setting up the Raspberry Pi
        2. Setting up Arduino
      6. Troubleshooting
      7. Summary
    15. 8. Remote-operated Robotic Arm
      1. What you will need
      2. Drive electronics
      3. Setting up the camera
      4. Deploying web applications
        1. The arm and chassis construction
      5. Calibration
        1. Chassis motors
        2. Arm 2 and hand servos
        3. The arm 1 servos
      6. Troubleshooting
        1. The video stream has a substantial delay
        2. The servos make a loud humming noise
        3. Control of the robot is lost
        4. The arm jumps to new positions
      7. Summary
    16. 9. Magic Mirror
      1. What you will need
      2. Tools you will need
      3. Theory
      4. The web application
        1. Developing a new widget
          1. The Python code
          2. The Jinja page template
          3. The JavaScript code
      5. The Pi setup
        1. Rotating the display
        2. Deploying the web application
        3. Setting up Chromium
      6. Enclosure construction
        1. Building the mirror without an enclosure
        2. The Pi enclosure
      7. Configuration
        1. Widgets
          1. Included widgets
          2. Example configurations
            1. bbc_ticker.conf
            2. clock.conf
        2. Styles
      8. Troubleshooting
        1. The web application fails with the 500 Internal Server Error
        2. The display does not work
      9. Summary
    17. 10. Bottle Xylophone
      1. What you will need
      2. Assembling a note bottle
      3. Electronics
      4. The web application
      5. Configuration
      6. Tuning
      7. Testing
      8. Troubleshooting
        1. Notes are missed
        2. Servos do not move correctly
      9. Summary
    18. Index
3.133.130.199