Menu

First step into Arduino and Node.js

December 18, 2017 - arduino, 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://github.com/rwaldron/johnny-five.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
  led.blink(500);
});

Run the program

node led-blink.js