First step into Arduino and Node.js

Install Firmata on Arduino

Open Arduino IDE – Select: File > Examples > Firmata > StandardFirmataPlus and Upload it to the Arduino

Install Johnny Five

Source Code:

git clone git:// && cd johnny-five
npm install

Install npm package with:

npm install johnny-five

Create a program – led-blink.js

var five = require("johnny-five");
var board = new five.Board();

board.on("ready", function() {

  var led = new five.Led(13);

  // "blink" the led in 500ms on-off phase periods

Run the program

node led-blink.js