How it's Architected
Most libraries inside of Arduino Create are statically linked, meaning that they are linked in the Arduino Create cloud. A few libraries (the larger ones) are dynamically linked to the library installed on the target platform, and must be installed manually on the target for that library to be used. For example, MRAA calls do not require that MRAA be installed previously on a board to work (statically linked in the cloud). Intel® Math Kernel Library (MKL), requires it to be installed on the board manually first (dynamically linked).
The current list of available libraries and how they are compiled is listed below:
|Intel® Math Kernel Library||Dynamically|
|AWS* IoT Device SDK||Statically|
|Microsoft Azure* IoT Device SDK||Statically|
If you’re interested in adding additional libraries, read the section on Adding Other Libraries below. Additional libraries that get added will be statically linked.
Libraries can be added by going to the Libraries tab in the Editor.
I’ll cover a few of the libraries below.
MRAA and UPM in Arduino* Libraries
Arduino libraries now use MRAA as the Hardware Abstraction Layer (HAL) for Linux based platforms. The Arduino C++ API can still be used just like for other platforms, but underneath MRAA does the translation to talk to the hardware. For more information on using MRAA and UPM in Arduino Create see my other article https://software.intel.com/en-us/articles/mraa-and-upm-basics-in-arduino-create .
As one of the libraries now available in Arduino Create, you can use OpenCV version 3.3.0. It is a dynamically linked library so it requires OpenCV to be installed on your target platform first. For instructions on installing it see https://github.com/intel-iot-devkit/up-squared-grove-IoT-dev-kit-arduino-create/tree/master/examples/OpenCV-Setup . While this tutorial was written for the UpSquared* Grove IoT Development Kit running Ubuntu* Server 16.04, the steps can easily be applied to any system running Ubuntu.
The OpenCV library (Libraries>OPENCV) in Arduino Create comes with two examples: Contours and HelloOpenCV. We’ve also created a People Counter example, which can be found in Libraries>UP SQUARED GROVE IOT DEV KIT>OpenCV-PeopleCounter.
Both the HelloOpenCV and OpenCV-PeopleCounter examples require a webcam. The Contours example does not.
Intel® Math Kernel Library (MKL)
- FFT of sensor data, in order to process and aggregate data from multiple sensors before sending over the network
- Data analysis, fitting data to mathematical models
- Data compression, taking data sets and creating smaller approximations for analysis or transmission
Adding other libraries
- Find the github repository of the library you want
- Download the .zip from that repository
- Import it into the Library Manager (this can take anywhere from a few seconds to several minutes depending on the size)
Since these libraries are coming from various sources, the best place to file issues for each library is at the following locations:
- OpenCV - https://github.com/opencv/opencv
- MRAA - https://github.com/intel-iot-devkit/mraa
- UPM - https://github.com/intel-iot-devkit/upm
- Intel® Math Kernel Library - https://software.intel.com/en-us/forums/intel-math-kernel-library
- AWS - https://github.com/intel-iot-devkit/aws-iot-device-sdk-cpp-arduino-create
- Microsoft Azure - https://github.com/intel-iot-devkit/azure-iot-sdk-c-arduino-create