Book Image

BeagleBone By Example

By : Pei JIA, Jayakarthigeyan Prabakar, Alexander Hiam
Book Image

BeagleBone By Example

By: Pei JIA, Jayakarthigeyan Prabakar, Alexander Hiam

Overview of this book

BeagleBone is a low cost, community-supported development platform to develop a variety of electronic projects. This book will introduce you to BeagleBone and get you building fun, cool, and innovative projects with it. Start with the specifications of BeagleBone Black and its operating systems, then get to grips with the GPIOs available in BeagleBone Black. Work through four types of exciting projects: building real-time physical computing systems, home automation, image processing for a security system, and building your own tele-controlled robot and learn the fundamentals of a variety of projects in a single book. By the end of this book, you will be able to write code for BeagleBone in order to operate hardware and impart decision-making capabilities with the help of efficient coding in Python.
Table of Contents (17 chapters)
BeagleBone By Example
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Adding libraries to Python


To make it easy to work with GPIOs on BeagleBone boards using Python programming language, we will be installing the Adafruit-BeagleBone-IO-Python library. The following steps will walk you through how to do it:

  1. Log in to your BeagleBone board.

    As we did in the previous chapter, the first thing you need to do is boot the BeagleBone board from the microSD card and log in to it via SSH:

  2. Update the repositories.

    Your next step will be to update the software dependency repositories in Debian running on the BeagleBone board before we start installing the other dependencies that are not installed and the libraries.

    You can use the apt-get update command to do this:

  3. Install the dependencies.

    In this step, we will be installing certain software packages that are necessary for the library to work with the BeagleBone board. The command that you need to execute is as follows:

    sudo apt-get install build-essential python-dev python-setuptools python-pip python-smbus –y
    

    The output...