6 Replies Latest reply on Jun 7, 2016 12:25 AM by Bashar

    Gpio 2 Error

    Bashar

      Hi all ,

       

      I have an error with Gpio 2 on Intel Galileo gen 2, this is my example code for the error:

       

      ---------------------------------------------------------------------------------------------------------------------

      var mraa = require('mraa');

      console.log('MRAA Version: ' + mraa.getVersion());

      var myDigitalPin2 = new mraa.Gpio(2);

      myDigitalPin2.dir(mraa.DIR_OUT);

      myDigitalPin2.write(1);

      ---------------------------------------------------------------------------------------------------------------------

       

      And the error appear like this:

       

      ---------------------------------------------------------------------------------------------------------------------

      ERROR: /home/root/.node_app_slot/main.js:3

      ERROR: var myDigitalPin2 = new mraa.Gpio(2);

      ERROR:                               ^

      ERROR: Error: Illegal arguments for construction of _exports_Gpio

        at Object.<anonymous> (/home/root/.node_app_slot/main.js:3:21)

        at Module._compile (module.js:456:26)

        at Object.Module._extensions..js (module.js:474:10)

        at Module.load (module.js:356:32)

        at Function.Module._load (module.js:312:12)

        at Function.Module.runMain (module.js:497:10)

        at startup (node.js:119:16)

        at node.js:935:3

      ---------------------------------------------------------------------------------------------------------------------

       

      Note:

      1- I am using Intel XDK IOT Edition.

      2- Intel Galileo gen 2.

      3- I have updated the libraries and the demon to latest versions.

      4- This error appears only with gpio 2, and if I used any other gpio the error will disappear.

      5- I have changed the galileo board and the same error appeared.

       

      Thanks in advance for your help,

      Bashar Thamir,