The MRAA library
Galileo IoT Developer Kit image brings a very useful library named MRAA (https://github.com/intel-iot-devkit/mraa). It is a low-level skeleton for the I/O communication, helping you stay away from the GPIOs direct manipulation, which can be harmful if you don't know what you are doing. Like the Arduino methods to control or read from the board pins, this library offers similar methods, comprising the following submodules:
Aio
: This contains the methods to read values from the board analog pins and change the ADC resolutionGpio
: This contains the methods to read and write to digital pinsI2c
: This contains the methods to communicate using I2cPwm
: This contains the methods to handle the pulse with modulation signalsSpi
: This enables the Spi busUart
: This enables the UARTNote
If you want to read more about the library's I/O capabilities, visit https://software.intel.com/en-us/articles/internet-of-things-using-mraa-to-abstract-platform-io-capabilities.
Let's test this library by...