Closed andrewfaria closed 10 years ago
Thanks!
Here's one thing I need to know and another thing you can try:
node -e 'console.log(require("mraa").getVersion());'
echo "src mraa-upm http://iotdk.intel.com/repos/1.1/intelgalactic" > /etc/opkg/mraa-upm.conf;
opkg update;
opkg install libmraa0;
... and then try your script again.
mraa version: v0.5.2-1-gfdb11d9
mraa update output: Package libmraa0 (0.5.2.1) installed in root is up to date.
Same error after update. :(
The first part is great. The second is a bummer. Ok next question (sorry I forgot ask this the first time): Are you using the Edison + Arduino expansion board or Edison + Mini-Breakout?
I have both, but started with the expansion board.
Ok, good. I have both as well. I'm going to hook up the Edison + Arduino Expansion and try to reproduce. I will post back as soon as I know more.
I also flashed this one with the latest image. I'll try the mini while you try the big boy. ;)
Works like a charm on the mini (before firmware upgrade).
Failed on the mini after I updated libmraa. :(
Can you paste the error?
I've confirmed the mraa javascript lib (by itself) is working.
Here's the error from johnny.js:
root@edison:~# node johnny.js
/home/root/node_modules/edison-io/node_modules/galileo-io/lib/mraa.js:66
state.io = new io.Gpio(this.addr);
^
Error: Illegal arguments for construction of _exports_Gpio
at new Pin (/home/root/node_modules/edison-io/node_modules/galileo-io/lib/mraa.js:66:16)
at Galileo.<anonymous> (/home/root/node_modules/edison-io/node_modules/galileo-io/lib/galileo.js:160:16)
at Array.map (native)
at new Galileo (/home/root/node_modules/edison-io/node_modules/galileo-io/lib/galileo.js:156:24)
at Object.<anonymous> (/home/root/johnny.js:4:7)
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)
johnny.js
var five = require("johnny-five");
var Edison = require("edison-io");
var board = new five.Board({
io: new Edison()
});
board.on("ready", function() {
var led = new five.Led(13);
led.blink();
});
This is strange, I just copied your example exactly as shown and it worked as expected.
So try this:
The update for Johnny-Five worked! :) Thank you for the super-sonic responses.
Looks like I need to revisit the board detection vs. explicitly defined IO instance creation. Thanks for the report and for your patience in working through it :)
Code: