Introduction: Johnny5 Arduino Robot DfRobotshop Rover With Remote Control Html Interface

In this post I explain step by step how I build an Arduino based Robot and program it with Javascript. I explain which design choices I made, which frameworks and technologies I used and how I program and configured the robot.

You can find more info about the design of the robot on my blog:

Step 1: Gather the Parts

The robot is based on a RoverV2 + Bluetooth Arduino robotic kit sold by Robotshop. This kit contains:

A compatible Arduino board including:Dual H-bridge and onboard voltage regulatorAn onboard chargerA Bluetooth moduleAn aluminum frameTamiya Twin-Motor Gear BoxTamiya Track and Wheel SetLithium Polymer Battery Cell – 3.7V 1000mAh The kit is complete and well documented but if you want to go hard core and start with a classic Arduino board, you can obtain the same result with following components: An Arduino compatible boardAn Arduino motor shieldA pair of two 5v motors and 4 Wheels & frameA Bluetooth module4xAA battery & holderThe goal of this article is to set the basic building blocks to build a robotic platform that you can extend to finally build an autonomous robot. You'll also need :

3 x ultrasonic sensors HC-SR04

1x Accelerometer MMA7361.

1x Compass HMC5883L

You can find all these components, including the wheels & frames in shops selling Arduino compatible boards online like SainSmart or Robotshop.

Step 2: Assemble the Basic Kit

To assemble the DFRobotshop RoverV2 you can follow this video:

Step 3: Extend the Basic Kit

First you'll need to add a frame where you can mount the extra sensors on it. I fixed a metallic frame with a screw on the main board where I mounted a lego plate that I fixed with another pair of screws. Then I could use lego bricks to mount the extra sensors on it.

The end result should look like this.

Step 4: Connect the Sensors

Here you can find the scematic for connecting the sensors to the Arduino Uno board.

Step 5: Setup Your Development Environment

Before you start make sure you’ve setup the following tools on your box:

– Git :

- Node v4.0.x :

– Python 2.7.x :

If you’re on windows make sure you’ve configure your PATH correctly for all of these tools, therefore I suggest you use Chocolatey to install all of these components.

Step 6: Download the Code

Create your working folder:

c:\Dev>mkdir arduino

cd arduino

Clone the repository:
c:\Dev\arduino> git clone

Install the packages:
c:\Dev\arduino\johnny5> npm install

You could receive some warnings here, don’t panic it should still be working fine.

Step 7: Flash Your Arduino Board

Because the onboard bluetooth ship is limited to 9600 baud I’hd to patch the firmate protocol.

This patched version can be found on the root folder.

Open the Arduino IDE, Connect your Robot to your PC through the usb cable and temporarly remove the bluetooth module from your Arduino board.

In the IDE select the correct com port.

Choose, File, open and select the “firmate_pulse_9600B_patch.ino” file located under: ..\johnny5\firmate_pulse_9600B_patch

Push the upload button.

Reconnect your bluetooth module.

Step 8: Connect Your PC to Your Arduino Board Via Bluetooth

You should go to your Bluetooth settings and associate your Bluetooth with a COM port.

On resent versions of windows you should click on the Bluetooth icon, choose “Add Bluetooth devices”.

You should see “Bluetooth_Bee_V3” click on it and enter the secret code: 1234.

You need to know which COM port windows as configured to your outgoing connections to you robot. Therefore open the Bluetooth settings, select the COM ports tab and note which COM port is associated with your Bluetooth_Bee_V3 outgoing connection.

Step 9: Configure and Start Your Node Server

With your preferred IDE modify the variable “comport” in the “app.js” file with the COM port you connected the Arduino with.

On the Johnny5 folder, start the program => “node app.js”.

Start your preferred browser on http://localhost:3000 , you should now be able to control your robot through the interface: