Step 1 - Install Node.js
Read moreInstallation Overview (Node.js)
Installing Node and NPM is pretty straightforward, using the installer package available from the Node.js® web site.
Installation Steps
- Download the Windows installer from the Nodes.js® web site.
- Run the installer (the .msi file you downloaded in the previous step).
- Follow the prompts in the installer (accept the license agreement, click the NEXT button a bunch of times, and accept the default installation settings).
Installation Overview (Jonny-Five)
- Open Command Prompt.
- Write the following command in CMD.
npm install johnny-five
- Wait for the installation.
Now, copy the code and save it into a .js file.
var five = require("johnny-five");
var board = new five.Board();
board.on("ready", function() {
console.log("Ready!");
var led = new five.Led(13);
led.blink(500);
});
Step 2 - Setup HardwarePlug the Arduino and open the command prompt. First, you need to specify the folder.
node blink.js //your file name
Type this and hit Enter. Done. Now you can see the blink of your Arduino LED using Node.js.
Comments
Please log in or sign up to comment.