rwaldron / galileo-io

Intel Galileo & Intel Edison IO Plugin for Johnny-Five
http://johnny-five.io
MIT License
101 stars 26 forks source link

Cannot call method 'getPlatformType' of undefined #23

Closed adricadar closed 9 years ago

adricadar commented 9 years ago

Hi, i'm a beginner in using galileo (I have a Galileo Gen1). I tried to use the example from Readme.md

//var Galileo = require("johnny-five"); // same error
var Galileo = require("galileo-io");  //  same error
var board = new Galileo();

board.on("ready", function() {
  var byte = 0;
  this.pinMode(9, this.MODES.OUTPUT);

  setInterval(function() {
    board.digitalWrite(9, (byte ^= 1));
  }, 500);
});

image

Notes: I used the url bellow to update my IoTKit, but this din't solve my problem. https://github.com/intel-iot-devkit/mraa/#installing-on-your-board

Researchs: I search in this https://github.com/rwaldron/galileo-io/blob/master/lib/mraa.js and i didn't find a method with name getPlatformType and also mraa is undefined.

ashishdatta commented 9 years ago

If you do cat /etc/verison what is the output?

Also did you download this image for your Gen 1? https://software.intel.com/en-us/iot/downloads

adricadar commented 9 years ago

The output is: 201405141447. I followed this tutorial for my image: https://learn.sparkfun.com/tutorials/galileo-getting-started-guide/all#bigger-linux-image

ashishdatta commented 9 years ago

That tutorial is quite old (Jan 2014). The image they are saying to use I do not believe is supported by MRAA..

I suggest downloading and using that image that I linked you. Here is a link for instructions on installation https://software.intel.com/en-us/node/520530

adricadar commented 9 years ago

Thank you for your help @ashishdatta, this solved my errors.