This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
node-server-ar-drone with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
npm install node-server-ar-drone
192.168.1.1by default. Once connected, simply:
var NodeServerArDrone = require('node-server-ar-drone'); var nsArDrone = new NodeServerArDrone();
Start up your browser and go to http://localhost:1337. Control the drone by sending POST requests to your local node server:
http://localhost:1337/takeofftakes off the drone, starts hovering it for 5 seconds and then lands it.
http://localhost:1337/takeoffAndSpintakes off the drone, starts hovering it for 4 seconds, spins it clockwise and then lands it after 1 second.
http://localhost:1337/landlands the drone immediately.
We can also automate the flight path of the drone, by providing predefined
x,y coordinates. You can do this by doing a call to http://localhost:1337/takeoffAndFly and then appending the call with the coordinates. Here is an example:
http://localhost:1337/takeoffAndFly?c=8,5&c=4,5takes off the drone, flies it to
[4,5]and then lands it.