
Updated the examples to comprehend transitive dependencies. This means that each example target will no longer have a giant list of -I includes (the examples at the end of the list had includes for all previous examples, upwards of 200 -I's on the command line). * Created a CMakeLists.txt in the upm/examples directory, moved common functionality to this level. * C/C++ examples now look to the filename for their dependency target name, ie; gas-mq2.cxx adds a dependency to the 'gas' target * Updated a handful of C/C++ example names to reflect this * Example CMake flow - glob the list of files, add targets for any special case examples, then att targets for all the rest Signed-off-by: Noel Eck <noel.eck@intel.com>
UPM (Useful Packages & Modules) Sensor/Actuator repository for MRAA
The UPM repository provides software drivers for a wide variety of commonly used sensors and actuators. These software drivers interact with the underlying hardware platform (or microcontroller), as well as with the attached sensors, through calls to MRAA APIs.
These packages contain sources for the respective UPM modules and will compile locally on the target using node-gyp when installed. They support Node.js 0.10 or newer.
Installing
The UPM modules have a hard dependency on MRAA, thus you will have to install
it first. Also, make sure Node can find MRAA by updating the NODE_PATH
variable if necessary. A global installation is preferred:
npm install mraa -g
After this, to install a UPM module using npm simply type:
npm install jsupm_<module-name> -g
Usage
Unfortunately, due to the way node-gyp builds MRAA and UPM, the platform initialization hooks are lost. This means you will have to do it manually, and require MRAA before you load a UPM module:
require('mraa');
var lib = require('jsupm_<module-name>');
Supported Sensors
The full list is available on Intel® IoT Developer Zone.
IDE Integration
Intel® XDK IoT Edition is the recommended IDE for Node.js development. Visit the Intel® Developer Zone IDE page for more information on how to get started.
Building UPM
See building documentation here.
Making your own UPM module
Our porting link has more information on making new UPM modules. Also check out our main Github page as we do have some guidelines if you would like to contribute your modules to the library.
API Documentation
Our Node.js documentation pages are hosted here. For other supported languages and their APIs please visit our main Github page.
API Compatibility
Even if we try our best not to, every once in a while we are forced to modify our API in a way that will break backwards compatibility. If you find yourself unable to run code that was working fine before a library update, make sure you check the API changes section first.
Changelog
Version changelog here.
Known Limitations
List of known limitations here.