Duino bleep code not compiling


hi,
i trying run following nodejs code, based on duino module found here: https://github.com/ecto/duino

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 );

but, following error:
bleep_duino:1: error: 'var' not name type
bleep_duino:2: error: 'var' not name type
bleep_duino:4: error: 'var' not name type
bleep_duino:7: error: expected unqualified-id before ')' token
bleep_duino:9: error: 'var' not name type
bleep_duino:15: error: expected constructor, destructor, or type conversion before '(' token

my file name called bleep_duino.ino.

i did type npm install duino, don't know how fix error. new nodejs. have arduino leonardo attached pc.

thank you.

that code pc. seem have missed step 3 on page linked to.


Arduino Forum > Using Arduino > Programming Questions > Duino bleep code not compiling


arduino

Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support