Issues with Intel Edison MRAA module

0 votes

I recently downloaded the Intel XDK IOT version and used the LED pin 13 Blink sample. I then uploaded the program onto the Edison, but it came up with a few errors; One of them being that it could not find the MRAA module. The sample code that came with it was: main.js:

var mraa = new require("mraa"); //require mraa
console.log('MRAA Version: ' + mraa.getVersion()); //write the mraa version to the Intel XDK console

var myOnboardLed = new mraa.Gpio(13); //LED hooked up to digital pin 13 (or built in pin on Galileo Gen1 & Gen2)
myOnboardLed.dir(mraa.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()
{
  myOnboardLed.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,1000); //call the indicated function after 1 second (1000 milliseconds)
}

package.JSON:

{
  "name": "Onboard LED Blink App",
  "description": "",
  "version": "0.0.0",
  "main": "main.js",
  "engines": {
    "node": ">=0.10.0"
  },
  "dependencies": {
  }
}
Jul 11, 2018 in IoT (Internet of Things) by Matt
• 2,270 points
1,103 views

1 answer to this question.

0 votes

You can work on this choice:-

  1. In the XDK IDE, there's a dropdown settings control just above the serial / terminal area on the right. If you drop down this list, it has options to update all of the libraries and node daemon. This is an easier way to make sure MRAA and all the other deps on the board are up to date and configured properly.
answered Jul 11, 2018 by anonymous2
• 4,240 points

Related Questions In IoT (Internet of Things)

0 votes
1 answer

Intel IOT with PLC

This might be a good option > http://node-opcua.github.io/ < ...READ MORE

answered Oct 10, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
680 views
0 votes
1 answer

Bridging an Internet Server with IoT Module

I did something similar with an IoT ...READ MORE

answered Oct 29, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
706 views
0 votes
1 answer
0 votes
1 answer

Display time in a Windows Core IoT app with a clock!

It is possible, but you should understand ...READ MORE

answered Jul 10, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
1,557 views
0 votes
1 answer

Intel Galileo Vs. Intel Edison?

Intel Galileo Key Features: Type: Single-Board Computer CPU: Intel Quark ...READ MORE

answered Aug 20, 2018 in IoT (Internet of Things) by DataKing99
• 8,250 points
2,164 views
0 votes
1 answer

Pair and connect new devices using Bluez5 DBUS API with C++

Although high-level APIs like Qt5, which also ...READ MORE

answered Oct 8, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
5,921 views
0 votes
1 answer

How to detect presence of a device in a WiFi network?

Finding the mac-address would probably work. Basically, ...READ MORE

answered Nov 16, 2018 in IoT (Internet of Things) by Shubham
• 13,490 points
3,359 views
0 votes
1 answer

Intel Edison: trouble updating app

Try getting into the routine of ; + ...READ MORE

answered Mar 4, 2019 in IoT (Internet of Things) by Shubham
• 13,490 points
726 views
0 votes
1 answer
0 votes
1 answer

MQTT connectivity issues with API

Am I missing something? Most definitely. The example ...READ MORE

answered Sep 24, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
768 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP