cylon/examples/crazyflie/crazyflie.coffee

17 lines
344 B
CoffeeScript
Raw Normal View History

Cylon = require '../..'
2013-11-28 11:10:10 +08:00
Cylon.robot
connection:
name: 'crazyflie', adaptor: 'crazyflie', port: "radio://1/10/250KPS"
device:
name: 'drone', driver: 'crazyflie'
work: (my) ->
my.drone.on 'start', ->
my.drone.takeoff()
after 10.seconds(), -> my.drone.land()
after 15.seconds(), -> my.drone.stop()
2013-11-28 11:10:10 +08:00
.start()