Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Getting started with Node.js and Robotics

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 983
    Comment on it

    These days developers are trying to make the robots and machines which can be controlled by the Javascript. From Sumo Bot battles, blinking lights, to Remote control cats

    Seems difficult, well, not exactly!

     

    All you need is the basic JavaScript knowledge and keen desire to learn.

     

     

    Image Source -http://nodebots.io/

     

     

    Getting Started with NodeBots Kits

     

    Microcontroller

     

    Image Source - http://www.robotshop.com/en/microcontrollers.html

    Microcontroller is a tiny computer that has a simple physical programmable circuit board that can do simple work of taking inputs and resulting outputs. There are various types of microcontroller that can be controlled by nodejs including BeagleBone Boards, Tessel boards, Arduino etc

     

    NodeBots

     

    Image Source - https://by.dialexa.com/nodebots-programming-with-javascript-for-robotic-systems-iot-and-beyond

     

    Nodebots are just robots that can be controlled by Node.js. If you are familiar with the Node.js, you can easily manipulate machines. Initially, it started as an access to the real world devices through reading and writing to serial ports at a very low level. Gradually, when the developers started taking a keen interest in it, NodeBots reached to a whole new level. Soon, Rick Waldron created the whole JavaScript Robotics and a programming framework called Johnny-Five just using Fimata library. It is still used to access microcontrollers like Arduino via software using javascript.

     

    We can use Arduino kit that provide components to test on as a beginner. Some of the starter kits are defined below and they are very similar to each other-

     

    1. SparkFun Inventors Kit
    2. Freetronics  Experimenter’s Kit for Arduino
    3. Seeed Studio ARDX starter kit
    4. Adafruit ARDX starter kit
    5. Adafruit ARDX Experimentation Kit for Arduino
    6. Arduino Starter Kit.

    Above Kit have their given guides to follow and understand the basic knowledge of the nodebots for their setup.

     

    Johnny-Five Inventor’s kit –

    Johnny-Five is another impressive Platform for Robotics which released by Bocoup in 2012. It is a robust, extensible and composable ecosystem. IO plugins help Johnny-Five code to communicate with machine language.

     

    Below is the defined setup of Blinking LED examples –

    Step 1- Install Node.js

    Step 2- Setup your board (be it Arduino, Tessel2, BeagleBone, Particle Photon or Intel Edison).

    Step 3- Run the following command

     npm install johnny-five

     

    Step 4-Run the following program in according to you board type

     

    For Arduino Boards

               
    
    var five = require("johnny-five");
    
    var board = new five.Board();
    
    
    board.on("ready", function() {
    
      var led = new five.Led(13);
    
      led.blink(500);
    
    });

     

    For Tessel2

    var five = require("johnny-five");
    
    var Tessel = require("tessel-io");
    
    var board = new five.Board({
    
      io: new Tessel()
    
    });
    
    
    board.on("ready", function() {
    
      var led = new five.Led("a1");
    
      led.blink(500);
    
    });
    
    

     

    For BeagleBone

    var five = require("johnny-five");
    
    var BeagleBone = require("beaglebone-io");
    
    var board = new five.Board({
    
      io: new BeagleBone()
    
    });
    
    
    board.on("ready", function() {
    
      var led = new five.Led("P9_14");
    
      led.blink(500);
    
    });

     

    For Particle Photon

    var five = require("johnny-five");
    
    var Photon = require("particle-io");
    
    var board = new five.Board({
    
      io: new Photon({
    
        token: PARTICLE_TOKEN,
    
        deviceId: PARTICLE_DEVICE_ID
    
      })
    
    });
    
    
    board.on("ready", function() {
    
      var led = new five.Led("D7");
    
      led.blink(500);
    
    });
    
    

     

    Feel free to share your thoughts on Node.js and Robotics. Thanks for the read!

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: