cylon/examples/crazyflie/crazyflie.js

22 lines
405 B
JavaScript
Raw Normal View History

2014-12-14 08:19:25 +08:00
"use strict";
var Cylon = require("../..");
Cylon.robot({
2014-11-26 08:01:31 +08:00
connections: {
2014-12-14 08:19:25 +08:00
crazyflie: { adaptor: "crazyflie", port: "radio://1/10/250KPS" }
2014-11-26 08:01:31 +08:00
},
devices: {
2014-12-14 08:19:25 +08:00
drone: { driver: "crazyflie" }
},
work: function(my) {
2014-12-14 08:19:25 +08:00
my.drone.on("start", function() {
my.drone.takeoff();
2014-11-26 06:39:24 +08:00
after((10).seconds(), my.drone.land);
after((15).seconds(), my.drone.stop);
});
}
}).start();