Book Image

Internet of Things with Intel Galileo

By : Miguel de Sousa, Ricardo Miguel F de Sousa
Book Image

Internet of Things with Intel Galileo

By: Miguel de Sousa, Ricardo Miguel F de Sousa

Overview of this book

Table of Contents (17 chapters)
Internet of Things with Intel Galileo
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The UPM library


The UPM (https://github.com/intel-iot-devkit/upm) library also comes with the IoT Developer Kit image and acts as a repository for sensors using the MRAA library. With the MRAA library, we were able to read data from the sensor connected to the Galileo analog pin, but the extracted data by itself isn't useful for us. UPM brings a module for Grove sensors, making it possible for us to extract the values that can make sense to us, such as lux values.

While MRAA provides us with low-level methods to read and control the I/O pins, this library makes the development using sensors easier. It supports a list of sensors (http://iotdk.intel.com/docs/master/upm/modules.html), making many useful methods available to facilitate controlling or extracting data from them.

Using the circuit that we just used to test MRAA and the Grove sensors UPM library (libupm-grove), let's see how we can use the UPM library to obtain lux units from the Light sensors. Inside the chapter5 folder, create a...