install an ipk file on ubilinux (MRAA)

install an ipk file on ubilinux (MRAA)

Another in my Intel Edison series, this time I will explain how to install an ipk file (in this case MRAA) onto an Intel Edison flashed with the Ubilinux software.

Open a terminal window

ssh [email protected]
apt-get install p7zip-full

Type in your password when prompted

chdir to the directory you downloaded the ipk file to (you did download it didn’t you??)

chdir ~/Downloads
If you forgot to download the MRAA ipk file, we can do it from the terminal window:

Extract the files to /

7z x libmraa0_0.5.4_i586.ipk
tar xvf data.tar -C/

All done :)

To test it, type in the following:

cat < < EOF > testmraa.js
var m = require('mraa'); //require mraa
console.log('MRAA Version: ' + m.getVersion()); //write the mraa version to the console

var myLed = new m.Gpio(13); //LED hooked up to digital pin 13 (or built in pin on Galileo Gen1 & Gen2)
myLed.dir(m.DIR_OUT); //set the gpio direction to output
var ledState = true; //Boolean to hold the state of Led
periodicActivity(); //call the periodicActivity function

function periodicActivity()
myLed.write(ledState ? 1 : 0); //if ledState is true then write a '1' (high) otherwise write a '0' (low)
ledState = !ledState; //invert the ledState
setTimeout(periodicActivity, 500); //call the indicated function after 0.5 seconds (500 milliseconds)

node testmraa.js
When you’re done admiring the flashing LED you can press Ctrl-C to stop the program running.

Related posts

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.