-
1Step 1: Install Go:
You first need to install Go from the following link
-
2Step 2: Installing GoBot
Then open up a command prompt or Terminal and type the following command to install GoBot tools
$ go get -d -u gobot.io/x/gobot/
-
3Step 3: Connect to Tello
Turn on your Tello and connect to its WiFi. The WiFi will be named like TELLO-XXXX.
-
4Step 4: Write your program
You can run the following example taken from the GoBot site. I use the Atom editor and save the file as tello.go. You can give it any name or extension. As long as you have Go installed, you should be able to run the Go program from the command line Terminal.
package main import ( "time" "gobot.io/x/gobot" "gobot.io/x/gobot/platforms/dji/tello" ) func main() { drone := tello.NewDriver("8888") work := func() { drone.TakeOff() gobot.After(5*time.Second, func() { drone.Land() }) } robot := gobot.NewRobot("tello", []gobot.Connection{}, []gobot.Device{drone}, work, ) robot.Start() }
-
5Step 5: Run your program and fly the drone
Then go back to your Terminal (command prompt on windows) and run your Go Program by typing
Go run tello.py
For full API reference you can visit
https://godoc.org/gobot.io/x/gobot/platforms/dji/tello
Hope you can buy and enjoy programming and flying your own Drone!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.