Created
May 27, 2015 18:49
-
-
Save jacobrosenthal/317473075d85c7aa43fe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RollingSpider = require("rolling-spider"); | |
var temporal = require("temporal"); | |
var options = { uuid: "fa4e842bacc44b11850653e3dced8110", | |
logger: console.log}; | |
var yourDrone = new RollingSpider(options); | |
yourDrone.connect(function() { | |
console.log("connect"); | |
yourDrone.setup(function() { | |
console.log("setup") | |
// NEW CODE | |
temporal.queue([ | |
{ | |
delay: 0, | |
task: function () { | |
yourDrone.flatTrim(); | |
yourDrone.startPing(); | |
yourDrone.takeOff(); | |
} | |
}, | |
{ | |
delay: 3000, | |
task: function () { | |
yourDrone.forward(); | |
} | |
}, | |
{ | |
delay: 500, | |
task: function () { | |
yourDrone.land(); | |
} | |
}]); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment