2016-03-21 10:39:45 +00:00
|
|
|
<p align="center">
|
|
|
|
|
<img src="http://iotdk.intel.com/misc/logos/mraa.png" height="150px" width="auto" algt="Mraa Logo"/>
|
|
|
|
|
</p>
|
2017-05-05 16:48:31 -07:00
|
|
|
|
2014-10-03 10:18:13 +01:00
|
|
|
libmraa - Low Level Skeleton Library for Communication on GNU/Linux platforms
|
2017-05-05 16:48:31 -07:00
|
|
|
=============================================================================
|
2014-04-08 18:43:26 +01:00
|
|
|
|
2016-05-09 18:57:29 +03:00
|
|
|
Libmraa is a C/C++ library with bindings to Java, Python and JavaScript to
|
|
|
|
|
interface with the IO on Galileo, Edison & other platforms, with a structured
|
|
|
|
|
and sane API where port names/numbering matches the board that you are on. Use
|
|
|
|
|
of libmraa does not tie you to specific hardware with board detection done at
|
2014-11-12 13:48:46 +00:00
|
|
|
runtime you can create portable code that will work across the supported
|
|
|
|
|
platforms.
|
2014-04-08 18:43:26 +01:00
|
|
|
|
|
|
|
|
The intent is to make it easier for developers and sensor manufacturers to map
|
2014-04-25 15:49:19 +01:00
|
|
|
their sensors & actuators on top of supported hardware and to allow control of
|
|
|
|
|
low level communication protocol by high level languages & constructs.
|
2014-04-08 18:52:54 +01:00
|
|
|
|
2018-02-05 18:37:04 +01:00
|
|
|
[](https://travis-ci.org/intel-iot-devkit/mraa) [](https://sonarcloud.io/dashboard?id=mraa-master)
|
2016-08-10 09:28:33 +01:00
|
|
|
|
2014-06-11 14:16:47 +01:00
|
|
|
Supported Boards
|
|
|
|
|
================
|
2014-05-23 14:47:23 +01:00
|
|
|
|
2014-11-21 16:44:56 +00:00
|
|
|
X86
|
|
|
|
|
---
|
2014-09-01 23:19:24 +01:00
|
|
|
* [Galileo Gen 1 - Rev D](../master/docs/galileorevd.md)
|
|
|
|
|
* [Galileo Gen 2 - Rev H](../master/docs/galileorevh.md)
|
2014-09-09 15:30:36 +01:00
|
|
|
* [Edison](../master/docs/edison.md)
|
2014-10-24 14:23:56 +01:00
|
|
|
* [Intel DE3815](../master/docs/intel_de3815.md)
|
2017-05-05 16:48:31 -07:00
|
|
|
* [Minnowboard](../master/docs/minnow_max.md)
|
2015-09-03 11:23:35 +01:00
|
|
|
* [NUC 5th generation](../master/docs/intel_nuc5.md)
|
2016-02-24 14:25:54 +00:00
|
|
|
* [UP](../master/docs/up.md)
|
2017-09-08 12:06:33 +01:00
|
|
|
* [UP Squared](../master/docs/up2.md)
|
2017-02-24 16:37:45 -05:00
|
|
|
* [Intel Joule](../master/docs/joule.md)
|
2014-05-23 14:47:23 +01:00
|
|
|
|
2014-11-21 16:44:56 +00:00
|
|
|
ARM
|
|
|
|
|
---
|
2015-02-15 22:57:24 +00:00
|
|
|
* [Raspberry Pi](../master/docs/raspberry_pi.md)
|
2016-10-25 12:03:23 +01:00
|
|
|
* [Banana Pi](../master/docs/banana_pi.md)
|
2015-04-09 16:23:37 +02:00
|
|
|
* [Beaglebone Black](../master/docs/beaglebone.md)
|
2017-01-19 14:09:28 +01:00
|
|
|
* [phyBOARD-Wega](../master/docs/phyboard-wega.md)
|
2017-05-08 13:50:22 -06:00
|
|
|
* [96Boards](../master/docs/96boards.md)
|
2014-11-21 16:44:56 +00:00
|
|
|
|
2017-10-04 12:08:52 -07:00
|
|
|
MIPS
|
|
|
|
|
---
|
|
|
|
|
* [Linkit Smart 7688](../master/docs/linkit_7688.md)
|
|
|
|
|
* [Onion Omega2](../master/docs/omega2.md)
|
|
|
|
|
|
2017-02-20 15:49:48 -08:00
|
|
|
FPGA
|
|
|
|
|
----
|
2017-04-06 13:38:34 -07:00
|
|
|
* [DE10-Nano](../master/docs/de_nano_soc.md)
|
2017-02-20 15:49:48 -08:00
|
|
|
|
2015-09-07 11:39:58 +01:00
|
|
|
USB
|
|
|
|
|
---
|
|
|
|
|
* [FT4222](../master/docs/ftdi_ft4222.md)
|
2017-05-05 16:48:31 -07:00
|
|
|
* [Firmata](../master/docs/firmata.md)
|
2015-09-07 11:39:58 +01:00
|
|
|
|
2017-09-11 07:49:57 -07:00
|
|
|
I2C
|
|
|
|
|
---
|
|
|
|
|
* [GrovePi](../master/docs/grovepi.md)
|
|
|
|
|
|
2016-06-26 17:55:14 +02:00
|
|
|
Mock
|
|
|
|
|
----
|
|
|
|
|
* [Generic simulated board](../master/docs/mock.md)
|
|
|
|
|
|
2016-08-17 14:37:06 +01:00
|
|
|
JSON platform
|
|
|
|
|
----
|
|
|
|
|
* [Platform loading](../master/docs/jsonplatform.md)
|
|
|
|
|
|
2014-08-14 11:40:34 +01:00
|
|
|
Installing on your board
|
2016-08-30 16:03:30 +01:00
|
|
|
========================
|
|
|
|
|
|
|
|
|
|
Installing on Ubuntu
|
|
|
|
|
--------------------
|
|
|
|
|
|
2018-04-13 10:06:52 -07:00
|
|
|
Here is a PPA for installing on Ubuntu Xenial or Bionic:
|
2016-08-30 16:03:30 +01:00
|
|
|
https://launchpad.net/~mraa/+archive/ubuntu/mraa
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
sudo add-apt-repository ppa:mraa/mraa
|
2016-10-20 16:15:04 -07:00
|
|
|
sudo apt-get update
|
2017-09-25 10:25:59 -07:00
|
|
|
sudo apt-get install libmraa1 libmraa-dev libmraa-java python-mraa python3-mraa node-mraa mraa-tools
|
2016-08-30 16:03:30 +01:00
|
|
|
```
|
|
|
|
|
|
2017-09-25 10:25:59 -07:00
|
|
|
Running MRAA tools or applications on Ubuntu systems requires elevated permissions
|
|
|
|
|
(e.g. run with `sudo`).
|
2016-08-30 16:03:30 +01:00
|
|
|
|
|
|
|
|
Install on Arch Linux
|
|
|
|
|
---------------------
|
|
|
|
|
|
|
|
|
|
There is an AUR package for mraa here: https://aur.archlinux.org/packages/mraa
|
|
|
|
|
|
2017-03-02 18:12:16 +01:00
|
|
|
Install on openSUSE
|
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
REPO="openSUSE_Tumbleweed"
|
|
|
|
|
if test "$(arch)" == "aarch64"; then
|
|
|
|
|
REPO="openSUSE_Factory_ARM"
|
|
|
|
|
fi
|
|
|
|
|
sudo zypper ar http://download.opensuse.org/repositories/hardware/$REPO/hardware.repo
|
|
|
|
|
sudo zypper in mraa
|
|
|
|
|
```
|
|
|
|
|
|
2016-08-30 16:03:30 +01:00
|
|
|
Installing for Node.js only
|
|
|
|
|
---------------------------
|
|
|
|
|
|
2018-04-13 10:06:52 -07:00
|
|
|
> Note: Node.js 7.0.0+ is not currently supported unless compiling with a patched
|
|
|
|
|
vesion of SWIG. See the corresponding section and document below.
|
2017-03-05 17:13:22 -05:00
|
|
|
|
2016-08-30 16:03:30 +01:00
|
|
|
You can also install just the node.js mraa module by using npm. You will need a
|
|
|
|
|
C++ compiler and the node development headers, however it's not required to
|
2018-04-13 10:06:52 -07:00
|
|
|
have SWIG installed. This works for node versions 6.x.x and prior.
|
2016-08-30 16:03:30 +01:00
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
npm install mraa
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Note that installing mraa in this way builds mraa without json-c so you cannot
|
|
|
|
|
use mraa_init_json_platform(). Also building this way means the mraa.node
|
|
|
|
|
includes a static version of libmraa rather than relying on a dynamic library
|
|
|
|
|
in /usr/lib.
|
|
|
|
|
|
2017-05-05 16:48:31 -07:00
|
|
|
Subplatforms (i.e. Firmata) have to be added manually with this kind of install
|
|
|
|
|
from your application, as shown in [this example](examples/javascript/firmata.js).
|
|
|
|
|
|
2014-06-11 14:16:47 +01:00
|
|
|
Compiling
|
|
|
|
|
=========
|
2014-05-23 14:47:23 +01:00
|
|
|
|
2014-08-14 11:27:22 +01:00
|
|
|
See documentation on [building](../master/docs/building.md)
|
2014-05-28 11:00:36 +01:00
|
|
|
|
2014-06-11 14:16:47 +01:00
|
|
|
Examples
|
|
|
|
|
========
|
2014-05-23 14:47:23 +01:00
|
|
|
|
2014-08-14 11:27:22 +01:00
|
|
|
See the [examples](../../tree/master/examples) available for various languages
|
2014-05-29 14:51:38 +01:00
|
|
|
|
2015-01-20 23:25:31 +00:00
|
|
|
Debugging
|
|
|
|
|
=========
|
|
|
|
|
|
|
|
|
|
Sometimes it just doesn't want to work, let us try and help you, you can file
|
|
|
|
|
issues in github or join us in #mraa on freenode IRC, hang around for a little
|
|
|
|
|
while because we're not necessarily on 24/7, but we'll get back to you! Have a
|
|
|
|
|
glance at our [debugging](../master/docs/debugging.md) page too.
|
|
|
|
|
|
2015-11-18 13:54:55 +00:00
|
|
|
API Documentation
|
|
|
|
|
=================
|
2014-05-23 14:47:23 +01:00
|
|
|
|
2015-11-18 13:54:55 +00:00
|
|
|
<a href="http://c.mraa.io"><img src="http://iotdk.intel.com/misc/logos/c++.png"/></a>
|
|
|
|
|
<a href="http://java.mraa.io"><img src="http://iotdk.intel.com/misc/logos/java.png"/></a>
|
|
|
|
|
<a href="http://py.mraa.io"><img src="http://iotdk.intel.com/misc/logos/python.png"/></a>
|
|
|
|
|
<a href="http://js.mraa.io"><img src="http://iotdk.intel.com/misc/logos/node.png"/></a>
|
2016-01-04 11:59:54 +00:00
|
|
|
|
2016-02-18 17:24:02 +00:00
|
|
|
Contact Us
|
|
|
|
|
==========
|
|
|
|
|
|
2016-03-09 15:12:08 +01:00
|
|
|
To ask questions either file issues in github or send emails on our [mailing
|
2016-02-18 17:24:02 +00:00
|
|
|
list](https://lists.01.org/mailman/listinfo/mraa). You might also catch us on
|
|
|
|
|
the mraa channel on freenode IRC.
|
|
|
|
|
|
|
|
|
|
See the [Contribution](CONTRIBUTING.md) documentation for more details.
|
|
|
|
|
|
2016-01-04 11:59:54 +00:00
|
|
|
Changelog
|
|
|
|
|
=========
|
|
|
|
|
|
|
|
|
|
Version changelog [here](docs/changelog.md).
|