MRAA

MRAA

Low Level Skeleton Library for IO Communication on GNU/Linux platforms

C/C++ library with bindings to JavaScript and Python to interface with the I/O on the Intel® Galileo board, Intel® Edison board, and other platforms with a structured and sane API where port names/numbering matches the board that you are on. Use of MRAA does not tie you to specific hardware, with board detection done at runtime, you can create portable code that works across multiple platforms.

  • AIO Sensors requiring an ADC value to be read

  • I2C Modules using the i2c bus

  • SPI Modules using the SPI bus

  • GPIO Modules using GPIOs directly

  • PWM Modules using a PWM capable GPIO pin

  • UART Modules using a serial connection (RX/TX)

Manual Installation, Latest Github Code Version

Yocto

    root@edison:~# git clone https://github.com/intel-iot-devkit/mraa.git
    root@edison:~# mkdir mraa/build && cd $_
    root@edison:~# cmake ..
    root@edison:~# make
    root@edison:~# make install
    root@edison:~# nano /etc/ld.so.conf
    /usr/local/lib/i386-linux-gnu/
    root@edison:~# ldconfig
    root@edison:~# ldconfig -p | grep mraa
    root@edison:~# export PYTHONPATH=$PYTHONPATH:$(dirname $(find /usr/local -name mraa.py))
    root@edison:~# nano ~/.bashrc
    export PYTHONPATH=$PYTHONPATH:$(dirname $(find /usr/local -name mraa.py))

Ubilinux

Based on Installing libmraa on Ubilinux for Edison

Upgrade via Opkg

Hello MRAA

The intent of MRAA is to make it easier for developers and sensor manufacturers to map their sensors & actuators on top of supported hardware and to allow control of low level communication protocol by high level languages & constructs.

Using MRAA and UPM requires to be aware of the versions installed, since there is a version dependency of UPM over MRAA.

To find out know the MRAA version that needs to be installed in order to use UPM, type the following in your edison terminal:

Something like this is printed in the screen:

From there you can see that we need to installed at least version 0.7.0 of MRAA. In the same fashion you can check the version of the installed MRAA library.

This basic MRAA example, can be used to verify it is correctly installed and found by the compiler

How to compile?..let's say you have the code above in a file named HelloMRAA.cpp, inside your edison, now from the Edison terminal type:

now if you run the program typing:

you will see something like this:

Last updated