11 Replies Latest reply on Feb 19, 2015 3:35 AM by arfoll

    Edison breakout runs LED blink demo code issue

    Yudofu

      Hi all:

       

      I have a Edison breakout board without Arduino, and install Intel XDK IOT edition.

      I flash the unit to the SW version edison-image-rel1-maint-rel1-ww42-14, and also update the MRAA to Version: v0.5.4-105-gbaa1a0a  by below instructions

       

      1. echo "src maa-upm http://iotdk.intel.com/repos/1.1/intelgalactic" > /etc/opkg/intel-iotdk.conf

      2. opkg update

      3. opkg upgrade

       

      I start a demo project for LED blink, I can upload and build the project without error/warning, however, the 1Hz waveform comes from J17 pin 14, which should be GP128/UART1_CTS.mraa: Intel Edison

       

      In the sample code, it is

       

      var myOnboardLed = new mraa.Gpio(13)

       

      I believe the MRAA of Edison breakout or Edison Arduino should be the same; so I can't understand why mraa.Gpio(13) would make GP128 working.

      If I change Gpio(13) to another number such as Gpio(28), there is more error.

       

                                                                                                                                                                                                                                  

      ERROR: /node_app_slot/main.js:23                                                                                                                                                                                             

      ERROR: var myOnboardLed = new mraa.Gpio(28); //LED hooked up to digital pin 13 (or bu                                                                                                                                         

      ERROR:                    ^                                                                                                                                                                                                   

      ERROR: Error: Illegal arguments for construction of _exports_Gpio                                                                                                                                                             

          at Object.<anonymous> (/node_app_slot/main.js:23:20)                                                                                                                                                                     

          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:906:3 

       

      I start another demo project DigitalWrite with same Edison unit, I still can upload and build, but there is error and not able to execute, situation is worse than above project.

       

      \\      

      ERROR: /node_app_slot/main.js:24                                                                                                                                                                                             

      ERROR: var myDigitalPins5= new io.Gpio(5);                                                                                                                                                                                   

                          ^                                                                                                                                                                                                         

      ERROR: Error: Illegal arguments for construction of _exports_Gpio                                                                                                                                                             

          at Object.<anonymous> (/node_app_slot/main.js:24: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:906:3 

       

      I checked some similar posts and the solutions are to upgrade MRAA, but I have done it. I also change Gpio(5) to Gpio(5,false) but not work.

      Do I use incorrect MRAA package or miss anything? Please help to give some suggestion if possible, thank you.