node package manager


This is the code that runs on the Arduino to control the robot using Johnny-Five. Based on the work from quickbot_bbb that uses BeagleBone Black to control the robot.


Essentially this code establishes socket (UDP) connection with another device (BASE) and waits for commands. The commands are either of the form of directives or queries. An example directive is setting the PWM values of the motors. An example query is getting IR sensor values.


  • clone the repo into home directory
  • npm install


npm test


  • check IP address of BASE and ROBOT (run command on both systems and look for IP address)

  • set BASE and ROBOT IP and PORT in config.js

  • npm start

Command Set

  • Check that the bot is up and running:

    • Command


    • Response

      "Hello from QuickBot\n"

  • Get PWM values:

    • Command


    • Example response

      "[50, -50]\n"

  • Set PWM values:

    • Command


  • Get sensor values:

    • Command


    • Example response

      "[80.0, 251.0, 234.1, 12.1, 21.3]\n"

  • Get encoder position:

    • Command


    • Example response

      "[200, -200]\n"

  • Get encoder velocity (tick velocity -- 16 ticks per rotation):

    • Command


    • Example response

      "[20.0, -20.0]\n"

  • Reset encoder position to zero:

    • Command


  • End program

    • Command: