mraa  1.5.1
Low Level Skeleton Library for Communication on GNU/Linux platforms
 All Data Structures Namespaces Files Functions Typedefs Enumerations Enumerator Macros Pages
Building mraa with imraa

Imraa allows seamless communication between the Arduino101 and your mraa projects. Imraa will flash an arduino101 and allow automatic loading of the MRAA_GENERIC_FIRMATA subplatform to the first process that calls imraa_init (done through mraa_init automatically)

Build dependencies

To build imraa, you'll need to build mraa with -DIMRAA=ON and all the normal dependencies for build mraa, see ./building.md "Building mraa". You'll also need the following:

Basic build steps

This will build mraa with imraa for the local default path. To build mraa for the system add -DCMAKE_INSTALL_PREFIX=/usr to the cmake command before running it.

```bash mkdir build cd build cmake -DIMRAA=ON -DFIRMATA=ON .. make ```

After you've built mraa you can install using make install.

Running Imraa

Before being able to use mraa to program the Arduino101 you will need to run imraa to flash the sketch file onto the board. The sketch file that imraa will look for is located here: Arduino101 Sketch. Once downloaded the file needs to be renamed and moved to the where mraa was installed. This is dependant on whether you installed locally or for the system. The example below is for a locally installed copy. Note this sketch is using ConfigurableFirmata + the CurieIMU plugin.

```bash $ mv ConfigurableFirmataCurieImu.ino.bin firmata101.ino.bin $ mv firmata101.ino.bin /usr/local/share/mraa ```

You will also need to move the imraa config so that imraa can find it. ```bash $ mv mraa/imraa/imraa.conf /etc/ ```

To flash the board run imraa and it will create the lockfile and flash the Arduino101. You may need root permissions or to add yourself to the uucp or modem group to access the device node (typically /dev/ttyACM0). ``` $ imraa ```

After this is successful you will be able to use mraa like normal, in the background mraa will handle talking to the arduino101 by creating /tmp/imraa.lock which imraa_init() will parse on startup.