Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node mraa lib #247

Open
wirsing opened this issue Nov 1, 2019 · 0 comments
Open

node mraa lib #247

wirsing opened this issue Nov 1, 2019 · 0 comments

Comments

@wirsing
Copy link

wirsing commented Nov 1, 2019

Which version is your board?

ReSpeaker Core v2

I'm currently trying to get the LED's to work through node using the mraa node library but am running into trouble.

Here is my code:

const mraa = require('mraa'); //require mraa
let power = new mraa.Gpio(12); //setup digital read on pin 12
power.dir(mraa.DIR_OUT); //set the gpio direction to output
power.write(1);

And here is the output:

let power = new mraa.Gpio(12); //setup digital read on pin 12
            ^
Error: Illegal arguments for construction of _exports_Gpio
    at Error (native)
    at Object.<anonymous> (/home/respeaker/led_custom/index.js:9:13)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:390:7)
    at startup (bootstrap_node.js:150:9)

Using node 6.10.3

Any idea why the node version would throw this error? I tried running as root as well with no success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant