Login to disable ads!

Want to code your drone? Use node.js!

Parrot SDK, Linux SDK, Java, PC, Mac, scripts for Parrot drones... etc.
Post Reply
ShellDude
Batterys getting low
Posts: 957
Joined: 04 Jan 2011, 20:10
Drone Type: Bebop
Location: Philadelphia, PA USA
Has thanked: 0
Been thanked: 1 time

Want to code your drone? Use node.js!

Post by ShellDude » 10 Nov 2013, 18:02

node.js is a javascript runtime that allows you to run all kinds of javascript based operations outside of a browser. This functionality has been extended to the AR.Drone and covers easily 90+ % of the functions available to developers, who typically distinguish themselves with a high tolerance for pain, using the Parrot provided API.

You can learn more about node.js (the platform) here: http://nodejs.org" onclick="window.open(this.href);return false; Go through the framework installation process and validate it is working properly.

Once you've got node.js running, gaining access to your drone is as simple as installing the nodecopter.js contributed libraries -- documented here: http://nodecopter.com/hack" onclick="window.open(this.href);return false;
Let's say you want to take over LED animation (a recent topic du jour here), it's literally as simple as:

Code: Select all

client.animateLeds(animation, hz, duration)

Performs a pre-programmed led sequence at given hz frequency and duration (in sec!). animation can be one of the following:

['blinkGreenRed', 'blinkGreen', 'blinkRed', 'blinkOrange', 'snakeGreenRed',
'fire', 'standard', 'red', 'green', 'redSnake', 'blank', 'rightMissile',
'leftMissile', 'doubleMissile', 'frontLeftGreenOthersRed',
'frontRightGreenOthersRed', 'rearRightGreenOthersRed',
'rearLeftGreenOthersRed', 'leftGreenRightRed', 'leftRedRightGreen',
'blinkStandard']
Example:

client.animateLeds('blinkRed', 5, 2)
You can learn more about the nodecopter.js library here: https://github.com/felixge/node-ar-drone" onclick="window.open(this.href);return false;

Feel free to start your own thread with questions, or add to this one. While I don't use node.js or nodecopter.js as my daily driver, I've spent enough time with it to answer most questions.

Enjoy!

mariomazu
Newcomer
Posts: 1
Joined: 04 Dec 2014, 21:18
Drone Type: AR.Drone 2
Has thanked: 0
Been thanked: 0

Re: Want to code your AR.Drone? Use node.js!

Post by mariomazu » 04 Dec 2014, 21:24

I was looking for something like this, I really appreciate it...
Thank you

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest