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

Project – toggle LED using a push button


Now that we have a clear idea about what physical computing systems are and how they work, let's go ahead and build our own physical computing system using BeagleBone Black by connecting a push button switch to act as a input to the system and an LED which will act as the output. How we write the software program will decide what the LED does based on the input from the push button switch.

We already know how to connect an LED to the BeagleBone board and also how to program in Python to turn on and turn off the LED just as we experimented in the project of the last chapter. In this project, we will use the knowledge we gained and what we are going to learn now before we go ahead and build the physical computing system. Now that we know how to interface an LED, let's learn how to interface a push button and read input value from the push button connected to the BeagleBone board using Python.

First, connect the push button to BeagleBone Black, as shown...