Friday, 6 November 2015

Parrot Rolling Spider Drone

Hey Friends,
I am back again with some projects that I am currently working on. I would love to hear new possibilities as well as what could be done to improve the same.

I recently got my hands on the Parrot rolling spider drone. It is a small sized drone of around the size of a palm that can be controlled by Bluetooth BLE. I selected the following setup:

The round thingies are IR reflector markers which I am using in the lab setting along with Optitrack cameras to keep track of the drones position. I intend the drone to be able to do certain tasks autonomously such as going from one point of area to other or traversing through a series of waypoints or maybe following another ground bot. I also aim to develop voice controlled app to control the drones via speech.

I order to achieve my goal, I started off with controlling the drone manually from any PC. To do so, I came across a wonderful library:

This library can be used to hack the rolling spider or send commands to the rolling spider. The link is self sufficient, but I would like to reiterate it here. Please follow the following steps to be able to use the library:
  1. Install Nodejs.
    The link for the same is:
  2. Install Python v2.7.3(recommended)
    The link for it is:

    After this, we need to add the path variable for python.exe.
  3. Install Microsoft Visual Studio C++ 2013(Express Edition)
    The link:
  4. Windows 7 SDK.
    The link :
  5. Install node-gyp.
    The zip file for the same needs to be downloaded from:

    It can be installed by executing the following command in command prompt.:
    npm install -g node-gyp
  6. Next u need a bluetooth 4.0 BLE adapter. Then the driver needs to changed to Winusb using the zadig tool.
    The link for the same is:
  7. Install Noble. It is a node.js BLE central module. The link and detailed information can be found on:

    The zip file needs to downloaded from the link. It can be installed through command prompt by the following command:
    npm install -g noble
  8. Now we go to the last step, that is installing the rolling-spider library.
    For this download the zip file from:

    To install, do it through command prompt:
    npm install rolling-spider
More information can be found on the libraries in the respective links given by the developers. Its simply amazing :)

So, now we are all set to be able to get our drone flying. We need to type in a set of actions using the rolling-spider library to command the drone. I started off with controlling the drone via keypress events. The code can be seen below:

'use strict';

var RollingSpider = require('rolling-spider');
var temporal = require('temporal');
var rollingSpider = new RollingSpider();

var keypress = require('keypress');

rollingSpider.connect(function () {
  rollingSpider.setup(function () {
console.log('Now Active for receiving commands');
console.log('Give your input');
// listen for the "keypress" event
process.stdin.on('keypress', function (ch, key) {
  console.log('got "keypress"',;
  if (key && key.ctrl && == 'c') {
  else if (key && == 'w') {
console.log('Going forward');

rollingSpider.forward({step:10, speed: 30});

  else if (key && == 's') {
console.log('Going backward');
          rollingSpider.backward({steps: 15, speed: 20});
   else if (key && == 'a') {
          console.log('Going left');
          rollingSpider.tiltLeft({steps: 15, speed: 20});
   else if (key && == 'd') {
          console.log('Going right');
          rollingSpider.tiltRight({steps: 15, speed: 20});

  else if (key && == 't') {
 console.log('Getting ready for takeOff!');

  else if (key && == 'l') {
          console.log('Time to land');
  else if (key && == 'up') {
          console.log('Going up');
          rollingSpider.up({steps: 15, speed: 20});

  else if (key && == 'down') {
          console.log('Going down');
          rollingSpider.down({steps: 15, speed: 20});
   else if (key && == 'left') {
          console.log('Turn Left');
          rollingSpider.turnLeft({steps: 15, speed: 20});
   else if (key && == 'right') {
          console.log('Turn Right');
          rollingSpider.turnRight({steps: 15, speed: 20});
  else if (key && == 'f') {
          console.log('OMG Flip!');
    else if (key && == 'q') {
          console.log('Bye Bye');


Then after being able to run the drone, I wanted to create a voice controlled app to control the drone. I started learning with android studio. I have to say its fun :)
This is when I came across MIT appinventor. I was amazed at how good it is and how simple and easy have they made for us to make an app. I was able to make the voice controlled app and the run video is:

After this, I decided to use Optitrack to keep track my Drones position and make it follow a set of waypoints. The waypoints here consist of points on the track. It needs to be more stable and perfect. But still it works :D. The result of the same is:

The problems that I faced for my project were many. Sometimes the drone refused to move, sometimes got freezed. I am still working on it. Moreover the Optitrack PC and my laptop communicate using socket communication and I am facing error that sometimes it throws socket has been closed error. Hope I get it fixed soon :D

I recently got my hands on the Parrot AR drone 2.0. Time to get to work :D


  1. For the first time in India, we at Creogen Technologies Private Limited has built an Autonomous Cleaning and Surveillance Robot called SRISHTI. This is an Artificially Intelligent robot which is able to perform a multitude of tasks and is completely wireless. To know more about us please
    contact us from the given links.

  2. Thank you for taking some time to write this post. This is mainly due to a bunch of interesting features offered by the manufacturer at a price that’s considerably fair. Something that you will notice about the drone is the fact that it looks pretty regular. You can know more here see more

  3. The Flying Computer Drone can be hackedThe Flying Computer Drone can be hacked – We have heard hacking related to information of charge card, pay, assurance, messages, Defense, Security and others. Every such datum is hacked by familiarizing malware or disease on with the PC system by methods for Internet. Hacking every one of these information isn't the end; software engineers are furthermore drawn in with hacking meanders, a flying PC