1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-24 13:48:49 +08:00
Thomas Kohler 0d0a508c60
core(build): CLI removed (#946)
* core(build): CLI removed
* adjust install instructions in doc and README
* fix master_test and remove useless/duplicated tests examples_test.go
2023-06-04 18:36:55 +02:00

45 lines
937 B
Go

/*
Package ardrone provides the Gobot adaptor and driver for the Parrot Ardrone.
Installing:
Please refer to the main [README.md](https://github.com/hybridgroup/gobot/blob/release/README.md)
Example:
package main
import (
"time"
"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/platforms/parrot/ardrone"
)
func main() {
ardroneAdaptor := ardrone.NewAdaptor()
drone := ardrone.NewDriver(ardroneAdaptor)
work := func() {
drone.TakeOff()
drone.On(drone.Event("flying"), func(data interface{}) {
gobot.After(3*time.Second, func() {
drone.Land()
})
})
}
robot := gobot.NewRobot("drone",
[]gobot.Connection{ardroneAdaptor},
[]gobot.Device{drone},
work,
)
robot.Start()
}
For more information refer to the ardrone README:
https://github.com/hybridgroup/gobot/tree/master/platforms/parrot/ardrone/README.md
*/
package ardrone // import "gobot.io/x/gobot/v2/platforms/parrot/ardrone"