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

Preface

If you are among those who are looking for a simple step-by-step guide to learn basic electronics and start interfacing sensors and actuators with a low-cost Linux development board, such as BeagleBone Black through examples to build internet connected physical computing systems and robots. This book is for you to get started if you have prior knowledge of basic python programming and little understanding of how a computer works.

What this book covers

Chapter 1, Get Started with BeagleBone , tells us about the hardware specification of the BeagleBone board, how to set up a BeagleBone board to boot up with a Linux Operating System on microSD card and log in to the Linux command shell from a remote computer, and how to program on Python software running on the BeagleBone board.

Chapter 2, Circuit Fundaments and GPIO, talks about the working of basic electronic circuits including switches, LEDs, and battery followed by GPIO pins on the BeagleBone board and elaborates on how you can use these GPIO pins to switch LED status using a python program.

Chapter 3, Introduction to Physical Computing Systems, helps you understand the basic structure of physical computing systems with real world examples, build your own physical computing system using a switch as an input and LED as the output device connected to BeagleBone board which works based on the python program that you write.

Chapter 4, Real-Time physical computing systems Using BeagleBone Board, talks about analog sensors using LM35 temperature sensor as an example and works on a more advanced physical computing project using BeagleBone board interfaced with an LM35.

Chapter 5, Connecting Physical Computing Systems to the Internet, teaches you how to connect BeagleBone board to Wi-Fi networks, cloud storage and upload sensor data from BeagleBone board to cloud in real-time, and view the trends on the cloud software with time stamps. Build your first IoT.

Chapter 6, Home Automation Using BeagleBone, tells you about how to set up your own web server on a BeagleBone board using a Python and Flask framework and how to use the same to control home appliances using an AC relay board interfaced with BeagleBone board from a PC or your mobile phone connected to the internet, similar to any other IoT Home Automation system.

Chapter 7, Working with Images Using Computer Vision, teaches you how to interface a USB camera with BeagleBone board and how to OpenCV to capture images and work with them using Python.

Chapter 8, Home Security Systems Using BeagleBone Black, teaches us how to use SMTP with python to send emails, learn about PIR sensors and motion detection, build a smart intruder alert system by interfacing PIR sensor with BeagleBone board to detect motion, and use OpenCV to capture images and email them.

Chapter 9, Exploring Robotics, helps you understand the basic structure of robotic systems, their working and application in different areas using real life examples. It also helps us learn about differential drive robots

Chapter 10, Building Your Own Robot, teaches us about DC Motors, Motor Driver IC L293D and control of DC motors from Python on BeagleBone Black using this Motor Driver IC, live streaming of video on local server from USB camera connected to BeagleBone board, and building your own Tele Controlled Robot with live video streaming.

What you need for this book

Basic Python programming knowledge and little understanding of how a computer works in terms of the electronics inside it.

Who this book is for

This book is for those who are looking for a simple step by step guide to learn basic electronics and start interfacing sensors and actuators, with a low-cost Linux development board like BeagleBone Black through examples to build IoT and Robot Systems

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: " Let's power off our BeagleBone board using the command sudo poweroff, which will shut down the operating system."

A block of code is set as follows:

<img src="http://192.168.2.42:8080/?action=stream">

Any command-line input or output is written as follows:

sudo python Blink.py

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Click on Yes and continue."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book 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.

You can download the code files by following these steps:

  1. Log in or register to our website using your e-mail address and password.

  2. Hover the mouse pointer on the SUPPORT tab at the top.

  3. Click on Code Downloads & Errata.

  4. Enter the name of the book in the Search box.

  5. Select the book for which you're looking to download the code files.

  6. Choose from the drop-down menu where you purchased this book from.

  7. Click on Code Download.

You can also download the code files by clicking on the Code Files button on the book's webpage at the Packt Publishing website. This page can be accessed by entering the book's name in the Search box. Please note that you need to be logged in to your Packt account.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows

  • Zipeg / iZip / UnRarX for Mac

  • 7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/BeagleBone-By-Example. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.