2018-04-04 03:33:42 +08:00
|
|
|
# Tello
|
2018-04-04 02:42:16 +08:00
|
|
|
|
|
|
|
This package contains the Gobot driver for the Ryze Tello drone, sold by DJI.
|
|
|
|
|
2018-04-05 17:31:38 +08:00
|
|
|
For more information on this drone, go to: https://www.ryzerobotics.com/tello
|
2018-04-04 02:42:16 +08:00
|
|
|
|
|
|
|
## How to Install
|
|
|
|
|
|
|
|
```
|
|
|
|
go get -d -u gobot.io/x/gobot/...
|
|
|
|
```
|
|
|
|
|
|
|
|
## How to Use
|
2018-04-05 17:31:38 +08:00
|
|
|
|
|
|
|
Connect to the drone's Wi-Fi network from your computer. It will be named something like "TELLO-XXXXXX".
|
|
|
|
|
|
|
|
Once you are connected you can run the Gobot code on your computer to control the drone.
|
2018-04-04 02:42:16 +08:00
|
|
|
|
|
|
|
Here is a sample of how you initialize and use the driver:
|
|
|
|
|
|
|
|
```go
|
2018-04-04 03:33:42 +08:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
2018-04-04 03:34:50 +08:00
|
|
|
"time"
|
2018-04-04 03:33:42 +08:00
|
|
|
|
|
|
|
"gobot.io/x/gobot"
|
|
|
|
"gobot.io/x/gobot/platforms/dji/tello"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2018-04-05 17:31:38 +08:00
|
|
|
drone := tello.NewDriver("8888")
|
2018-04-04 03:33:42 +08:00
|
|
|
|
|
|
|
work := func() {
|
|
|
|
drone.TakeOff()
|
|
|
|
|
|
|
|
gobot.After(5*time.Second, func() {
|
|
|
|
drone.Land()
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
robot := gobot.NewRobot("tello",
|
|
|
|
[]gobot.Connection{},
|
|
|
|
[]gobot.Device{drone},
|
|
|
|
work,
|
|
|
|
)
|
|
|
|
|
|
|
|
robot.Start()
|
|
|
|
}
|
2018-04-04 02:42:16 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
## References
|
|
|
|
|
2018-04-04 03:33:42 +08:00
|
|
|
Thanks to https://github.com/microlinux/tello for serving as an example for the Tello community with his Python library.
|