You are previewing Experimenting with Raspberry Pi.
O'Reilly logo
Experimenting with Raspberry Pi

Book Description

Need some inspiration for your Raspberry Pi projects? Wondering how to work with Wii nunchucks, stepper motors, how to create a remote control panel? If you need guidance, Experimenting with Raspberry Pi is your own personal idea generator. Experimenting with Raspberry Pi covers how to work with various components and hardware like humidity and temperature sensors, Wii nunchucks, GPIO extenders, and IR receivers so you can add these to your own projects.

Written with budgets in mind, author Warren Gay encourages you to build, experiment, and swap out various parts to learn more about the Pi and come up with the best ideas and instructions for your own amazing Raspberry Pi project ideas.

Table of Contents

  1. Cover
  2. Title
  3. Copyright
  4. Dedication
  5. Contents at a Glance
  6. Contents
  7. About the Author
  8. About the Technical Reviewer
  9. Acknowledgments
  10. Introduction
  11. Chapter 1: DHT11 Sensor
    1. Characteristics
    2. Circuit
    3. Protocol
      1. Overall Protocol
      2. Data Bits
      3. Data Format
      4. Software
      5. Chosen Approach
    4. Example Run
    5. Source Code
  12. Chapter 2: MCP23017 GPIO Extender
    1. DC Characteristics
      1. GPIO Output Current
      2. GPIO Inputs
      3. Standby Current
      4. Input Logic Levels
      5. Output Logic Levels
    2. Reset Timing
    3. Circuit
    4. I2C Bus
    5. Wiring and Testing
    6. Software Configuration
      1. General Configuration
    7. Main Program
    8. Module i2c_funcs.c
    9. Module sysgpio.c
    10. Example Run
    11. Response Times
  13. Chapter 3: Nunchuk-Mouse
    1. Project Overview
    2. Nunchuk Features
    3. Connector Pinout
    4. Testing the Connection
    5. Nunchuk I2C Protocol
      1. Encryption
      2. Read Sensor Data
    6. Linux uinput Interface
      1. Working with Header Files
      2. Opening the Device Node
      3. Configuring Events
      4. Creating the Node
      5. Posting EV_KEY Events
      6. Posting EV_REL Events
      7. Posting EV_SYN Events
      8. Closing uinput
    7. X-Window
    8. Input Utilities
    9. Testing the Nunchuk
      1. Testing ./nunchuk
      2. Utility lsinputs
      3. Utility input-events
    10. The Program
  14. Chapter 4: Real-Time Clock
    1. DS1307 Overview
      1. Pins X1 and X2
      2. Pin SQW/OUT
    2. Power
    3. 3-Volt Compatibility
      1. Logic Levels
    4. Tiny RTC Modifications
      1. Checking for Pull-up Resistors
    5. DS1307 Bus Speed
    6. RTC and RAM Address Map
    7. Reading Date and Time
    8. I2C Communication
    9. Wiring
    10. Running the Examples
    11. The Ultimate Test
    12. The Startup Script
  15. Chapter 5: VS1838B IR Receiver
    1. Operating Parameters
      1. Pinout
    2. VS1838B Circuit
      1. The IR Receiver
    3. Software
      1. Signal Components
      2. Code Organization
      3. Command-Line Options
  16. Chapter 6: Stepper Motor
    1. Floppy-Disk Stepper Motor
      1. Your Junk-Box Motor?
    2. Driver Circuit
      1. Darlington Pair
    3. Driving the Driver
      1. Input Levels
      2. Power-on Reset/Boot
    4. Modes of Operation
      1. Wave Drive (Mode 0)
      2. Full-Step Drive (Mode 1)
      3. Half-Step Drive (Mode 2)
    5. Software
      1. Testing
  17. Chapter 7: 76 The H-Bridge Driver
    1. The L298 Driver
      1. Sensing Resistor
      2. Enable A and B
      3. Inputs In1 and In2
      4. Protection Diodes
    2. L298 PCB
    3. Driving from GPIO
      1. The DMM Check
    4. Bipolar Stepper Modes
      1. One-Phase-On Mode
      2. Two-Phase-On Mode
      3. Half-Step Mode
    5. Choosing Driving GPIOs
    6. Project Schematic
      1. Junk-Box Motors
    7. Program Operation
      1. Program Internals
  18. Chapter 8: Remote-Control Panel
    1. Switched Inputs
    2. The CD4013
    3. Testing the Flip-Flop
    4. The LED
    5. ØMQ
      1. Performing Installation
      2. Compiling and Linking
    6. Sensing Station Design
    7. Sensing Station Program
    8. Console Program
      1. Console Commands
    9. Sensor Source Code
    10. Console Source Code
  19. Chapter 9: Pulse-Width Modulation
    1. Introduction to PWM
    2. PWM Parameters
    3. PWM Hardware Peripheral
    4. PWM Software
    5. Meter Circuit
    6. pwm Program
      1. Hardware PWM Set Command
      2. Hardware Based CPU Percent-Busy Display
      3. Software PWM Program
      4. How Many PWMs?
      5. Running the Software PWM Command
      6. Software Based CPU Percent-Busy Display
  20. Appendix A: Glossary
  21. Appendix B: Power Standards
  22. Appendix C: Electronics Reference
    1. Ohm’s Law
    2. Power
    3. Units
  23. Appendix D: ARM Compile Options
  24. Appendix E: Mac OS X Tips
  25. Index