And also this is the first step for beginners to learn arduinobots.
First You need to install following softwares.
STEP 1
- Node.js
- Microsoft visual studio
- Python 2.7
x86 are preferred.
STEP 2
- after installation above 3 applications you need to install jhonny-five library.
- To do that get the command prompt and type following command
npm install johnny-five
Note:- To do that you need connect computer to the internet
- after you enter the command it will get some packages from the internet and installed in your current directory
- When you go to your current directory in windows explorer you can see folder called node_modules in that folder you can see johnny-five folder.
To resolve errors please refer STEP 2 errors in this page
STEP 3
- So get the wordpad and enter the following code in it.
THIS CODE IS GET FROM THE JOHNNY-FIVE GIT REPOSITORY.
var five = require("johnny-five"), // or "./lib/johnny-five" when running from the source board = new five.Board(); board.on("ready", function() { // Create an Led on pin 13 and strobe it on/off // Optionally set the speed; defaults to 100ms (new five.Led(13)).strobe(); });
STEP 4
- Then save it in C:\Users\User1\node_modules\johnny-five as test.js
Note:- User1 is your username.
- If a message popup press ok button or yes button.
To resolve errors please refer STEP 4 errors in this page
STEP 5
- Then goto commnad line and go to the above folder (which file saved) by using this command
cd C:\Users\NRV\node_modules\johnny-five
- then Connect arduino borad and type
node test.js
To resolve errors please refer STEP 5 errors in this page
Now you will see the arduino boards pin 13 led bulb blink.
Its work ! , Thanx a lot :D
ReplyDelete