Using analog sensors
Now it's time to grab some analog data. Wait a second? Analog? Isn't the world we live in—including the BBB's—all digital? Mostly, yes. But the world of sensors is vast, and many of the most ubiquitous, most useful, and least costly sensors are analog devices. A great deal of the embedded sensing world—motion, temperature, humidity, light intensity, pressure, and accelerometers—consists of analog animals. So, how do we capture all that analog data goodness?
With ADC (analog to digital converter) pins, of course. And the BBB comes with seven pre-assigned analog inputs on our board, so it's nearly plug and play! Well, not quite. But at least we don't have to fuss with pin muxing right away.
Temperature sensors
For this recipe, we're using the TMP36, a very low cost (USD $1.50) analog temperature sensor that you can find at many different electronics stores or suppliers. It outputs an analog voltage that is proportional...