Getting Started with BeagleBone: Linux-Powered Electronic Projects With Python and JavaScript

Getting Started with BeagleBone: Linux-Powered Electronic Projects With Python and JavaScript

Matt Richardson

Language: English

Pages: 142

ISBN: 1449345379

Format: PDF / Kindle (mobi) / ePub


Many people think of Linux as a computer operating system, running on users' desktops and powering servers. But Linux can also be found inside many consumer electronics devices. Whether they're the brains of a cell phone, cable box, or exercise bike, embedded Linux systems blur the distinction between computer and device.

Many makers love microcontroller platforms such as Arduino, but as the complexity increases in their projects, they need more power for applications, such as computer vision. The BeagleBone is an embedded Linux board for makers. It's got built-in networking, many inputs and outputs, and a fast processor to handle demanding tasks. This book introduces you to both the original BeagleBone and the new BeagleBone Black and gets you started with projects that take advantage of the board's processing power and its ability to interface with the outside world.

The New Essential Guide to Alien Species (Star Wars)

Panorama des idées philosophiques: De Platon aux contemporains

Instant PhoneGap Social App Development

IPA: Brewing Techniques, Recipes and the Evolution of India Pale Ale

Building Search Applications: Lucene, LingPipe, and Gate

Detox Your Desk: Declutter Your Life and Mind

 

 

 

 

 

 

 

 

 

 

 

 

 

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Project: Networked Outlet Timer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Parts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Wire up the Circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Test the Circuit. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Taking it Further. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 6/Putting Python Projects Online. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Sending an Email Alert. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Functions in Python. . . . . . . . . . . . . . . . . . . . . . . .

pressed!” printed on screen, probably quite a few times. Why is that? The code that’s indented after while True: will execute over and over again really quickly. Each time it executes, it’s checking if the button is pressed. If the button is pressed, it’s printing the line to the terminal. In fact, this block of code would be executing even faster if it weren’t for line time.sleep(.01). Without that line, the BeagleBone’s processor would be burdened with checking the state of the pin every

As long as the button is still pressed… …stay in this loop, rechecking every .01 seconds. There’s also a way to look for changes in the value of the digital input. You can have your code look for a pin going high (rising), going low (falling), or just changing from one state to the other. These are called interrupts. In Example 5-4, you’ll find code that has a similar effect to the code in Example 5-3, but uses interrupts instead of polling the state of the button. Example 5-4. Using interrupts

B/ Setting up System Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 C/ Quick Reference: GPIO. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Contents www.it-ebooks.info v www.it-ebooks.info Foreword Matt is leading the charge to make technology serve you, the individual, and a new generation of innovators. BeagleBone Black is his newest, strongest— and most affordable—tool for building understanding, mastery,

Download sample

Download