You are previewing Learning BeagleBone Python Programming.
O'Reilly logo
Learning BeagleBone Python Programming

Book Description

Unleash the potential of BeagleBone using Python

In Detail

BeagleBone is a barebone computer that can be configured and customized for different applications and is almost half the price of a standard computer. This book will cover the basics of how BeagleBone Black's hardware interface subsystems work, and can be controlled using two popular Python libraries for BeagleBone Black. You will be introduced to BeagleBone Black's GPIO, PWM, ADC, UART, SPI, I2C, and eQEP subsystems. We will then dive deep into more complex built-in peripherals, demonstrating different ways to receive input from a user including buttons, potentiometers, and rotary encoders with the eQEP module. We will also learn about interfacing with external devices; this will be demonstrated using the serial modules to interface with external devices such as temperature sensors and accelerometers. Towards the end of the book, we will present a couple of real-world problems and demonstrate how to solve them with the skills you've acquired.

What You Will Learn

  • Set up BeagleBone Black for development with the PyBBIO and Adafruit_BBIO Python libraries

  • Understand how each of BeagleBone Black's hardware interface subsystems work

  • Connect many different types of hardware to BeagleBone Black

  • Use Python code to control and communicate with external hardware

  • Write programs that interact with the physical world around you

  • 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. Learning BeagleBone Python Programming
      1. Table of Contents
      2. Learning BeagleBone Python Programming
      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. Errata
          2. Piracy
          3. Questions
      8. 1. Before We Begin
        1. An overview of BeagleBone
          1. General purpose input/output
          2. Analog-to-digital converter
        2. Pulse width modulation
          1. Universal asynchronous receiver/transmitter
          2. Serial peripheral interface
          3. Inter-Integrated Circuit
        3. Tools and additional hardware
        4. The BeagleBone design
        5. Board comparison
        6. Helpful resources
        7. Summary
      9. 2. Getting Started
        1. Initial setup
        2. Updating your Debian image
        3. Connecting to your BeagleBone
          1. The Cloud9 IDE
          2. SSH
        4. Connecting to the Internet
          1. Ethernet
          2. Network forwarding
        5. Using the serial console
        6. Updating your software
        7. The PyBBIO library
        8. The Adafruit_BBIO library
        9. Summary
      10. 3. Digital Outputs
        1. GPIO modules
          1. Kernel drivers
          2. Pin multiplexing
        2. Interactive GPIO
        3. Calculating resistor values for LEDs
        4. Driving higher currents from GPIO pins
        5. Blink
        6. Taking advantage of the OS
          1. Multiprocessing
          2. Running at startup
        7. Summary
      11. 4. PWM and ADC Subsystems
        1. PWM
          1. Fading an LED
          2. Servo motors
        2. ADC
          1. Voltage divider
          2. Voltage follower
        3. Your first robot
        4. Summary
      12. 5. User Input
        1. Buttons
          1. Pull-up/pull-down resistors
          2. Polling
          3. Interrupts
        2. Potentiometers
        3. Summary
      13. 6. Program Output
        1. LED displays
          1. LED bar graphs
          2. 7-segment displays
          3. The LED matrix
        2. SMTP
        3. Character LCD
        4. Summary
      14. 7. Serial Communication
        1. Serial communication
        2. UART
        3. I2C
        4. SPI
        5. Summary
      15. 8. Interfacing with External Devices
        1. Accelerometers
          1. Hooking it up
          2. Reading data
          3. Writing a module
          4. Using interrupts
        2. Summary
      16. 9. Using the Network
        1. TCP/IP
        2. HTTP
        3. IoT Services
          1. Phant
          2. dweet.io
          3. Freeboard
        4. Summary
      17. 10. A Practical Example
        1. Weather station
        2. Connecting to the Internet
        3. Weather alerts
        4. Summary
      18. A. The BeagleBone Black Pinout
      19. B. Disabling HDMI
      20. Index