Building MRAA from source on a Raspberry Pi A+

I am using Raspbian (Kernel 4.1)

You will also need “python” and “git” however these are pre-installed on the device.

Update apt-get

sudo apt-get update
sudo apt-get upgrade

Install NodeJS on a Raspberry Pi A+

latest version of Node for RPI is not supported, gra barchived:
Install it using dpkg
   sudo dpkg -i node_archive_armhf.deb
Test Node and NPM
   node -v
   npm -v
Update npm
   npm update npm
Change npms registry path from https to http
   npm config set registry

Install PCRE
tar jxf pcre-8.37.tar.bz2
chmod 777 configure
sudo make install
sudo ln -sfv ../../lib/$(readlink /usr/lib/ /usr/lib/
sudo ldconfig

Install SWIG 3.07 or higher
tar -xzf swig-3.0.7.tar.gz
sudo make install

Install python-dev

sudo apt-get install python-dev

Install cmake

sudo apt-get install cmake

install mraa

git clone
cd mraa

Comment out the following from /src/spi/spi.c
(line 144)
// if (ioctl(dev->devfd, SPI_IOC_RD_MAX_SPEED_HZ, &speed) != -1) {
// if (speed < hz) {
// dev->clock = speed;
// syslog(LOG_WARNING, "spi: Selected speed reduced to max allowed speed");
// }

mkdir build
cd build

This is where it got weird and i tried something random and it worked

Go into your project directory and install mraa via npm

cd ~projectdirectory
npm install mraa

You then need to copy mraa.node from