Getting Started With BeagleBone by Matt Richardson

Getting Started With BeagleBone by Matt Richardson

Author:Matt Richardson
Language: eng
Format: epub, pdf
Tags: COMPUTERS / Programming / Open Source
ISBN: 9781449345327
Publisher: Maker Media, Inc
Published: 2013-10-03T16:00:00+00:00


Wait here until the button changes from low to high.

Wait here until the button changes from high to low.

Reading an Analog Input

Up until now, we’ve only been working with digital inputs and outputs. That is to say, only things that are on or off. For instance, the button was pressed or it wasn’t, never anything in between. The same was true with the LED, we’d always write “high” or “low,” never anything in between. Sometimes, however, you want an input that delivers a range of values, such as the temperature, the light levels, or the state of a dial. The BeagleBone has seven pins that can be used as analog inputs to get values from these types of sensors.

Like all computers, the BeagleBone does its work in the digital realm, so values from analog sensors must be converted to digital. The part of the BeagleBone that’s responsible for this is called the analog-to-digital converter, or ADC. The ADC on the BeagleBone will let you check for values between 0 volts and 1.8 volts. (See Figure 5-3 for an analogy of analog and digital input.)



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.