javascript - duino bleep code not running -
i trying run following nodejs code, based on duino module found here: https://github.com/ecto/duino
bleep.js:
var arduino = require("duino"); var board = new arduino.board(); var led = new arduino.led({ board: board, pin: 13 }); var bleep = function() { led.on(); settimeout(function() { led.off(); }, 100); } setinterval( bleep, 1000 );
edit
based on zmo's suggestion, running du.ino (found under duino/src/) on arduino board , bleep.js on laptop.
whilst compiling bleep.js, following error: error: cannot open /dev/
i trying trace path being set. have traced error duino/node_modules/serialport/serialport.js
may know how following line (found in serialport.js) works?
function serialport(path, options, openimmediately, callback) {
before function called on line 49, 'path' variable [object object].
after, becomes /dev/
where change take place?
thank you.
uhuh... start.
it looks you're trying compile js code arduino sketch .ino
files using arduino ide. can't work, should c++ code.
Comments
Post a Comment