Skip to content

Instantly share code, notes, and snippets.

@jacobrosenthal
Created May 27, 2015 18:49
Show Gist options
  • Save jacobrosenthal/317473075d85c7aa43fe to your computer and use it in GitHub Desktop.
Save jacobrosenthal/317473075d85c7aa43fe to your computer and use it in GitHub Desktop.
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