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

Chapter 6. Home Automation Using BeagleBone

In this chapter, we will be learning how to build a home automation system using BeagleBone Black. To get started, first we will be learning about Internet connected home automation systems and how they work. Then, we will move on to setting up Python Flask library that lets you run the HTTP server on your BeagleBone Black using Python.

Once we are up and running with the server using a Flask library on Python, we will use it to go ahead and create a program in which you can turn a GPIO on and turn off using the input from the webpage created by the server. This GPIO pin will be used to turn on and turn off an electrical relay to switch a lamp on and off.

The contents of the chapter are divided into the following:

  • Prerequisites

  • The structure of home automation systems

  • An introduction to webservers

  • An introduction to Flask for Python

  • Setting up Flask for Python on a BeagleBone board

  • Creating a webserver using Flask

  • Transistors, relays, and power switches...