⬆️ ⬇️

Nodecopter - control quadcopter Javascript

There has long been an entire community of amateur developers who programmed flying robots. They hold periodic conferences and meetings. But what is the feature of this community, you ask? The fact is that quadcopter programming is done in Javascript on the NodeJS platform. Among the developers, the already well-known ArDrone Parrot is very popular, and has been covered in the pages of Habr more than once.







Details under the cut.



')

To start writing under ArDrone Parrot right now, it’s enough to install NodeJS for yourself and download the special module ar-drone from the github:



github.com/felixge/node-ar-drone



This can also be done through NPM:



$ npm install ar-drone



The next few lines of javascript code make the quadrocopter turn clockwise by 180 degrees, execute a preport and land:



var arDrone = require('ar-drone'); var client = arDrone.createClient(); client.takeoff(); client .after(5000, function() { this.clockwise(0.5); }) .after(3000, function() { this.animate('flipLeft', 15); }) .after(1000, function() { this.stop(); this.land(); }); 




Full documentation can be found at nodecopter.com/guides



Open SDK for ArDrone Parrot

projects.ardrone.org/projects/show/ardrone-api



There is support for streaming video and data from the quadcopter sensors. An impressive community has formed around the project. Guys wander around America and hold coding events for AR drone.



You can even connect Arduino to your ArDrone. In Javascript, it will look like this:



 var serialport = require('node-serialport') var sp = new serialport.SerialPort("/dev/ttyO3", { parser: serialport.parsers.raw, baud: 9600 }) sp.on('data', function(chunk) { console.log(chunk.toString('hex'), chunk.toString(), chunk) }) 




Details about working with Arduino in the context of Nodecopter can be found here:

gist.github.com/maxogden/4152815



Official community site - nodecopter.com

On it you can find news on development and conferences. By the way, on May 30, 2013, the next conference in the “Summer of Drones” format is being prepared. It will take place in Helsinki.









“Summer of Drones” is a large-scale conference, the purpose of which is to gather all like-minded people under one roof and demonstrate the peaceful application of technical progress. Quadcopters can be used not only as spy robots, and the organizers prove this from conference to conference, carrying out all sorts of contests.



Source: https://habr.com/ru/post/175241/



All Articles