gobot.io/x/gobot@v1.16.0/platforms/parrot/ardrone/README.md (about)

     1  # Ardrone
     2  
     3  The ARDrone from Parrot is an inexpensive quadcopter that is controlled using WiFi. It includes a built-in front-facing HD video camera, as well as a second lower resolution bottom facing video camera.
     4  
     5  For more info about the ARDrone platform click [here](http://ardrone2.parrot.com/).
     6  
     7  ## How to Install
     8  ```
     9  go get -d -u gobot.io/x/gobot/...
    10  ```
    11  
    12  ## How to Use
    13  ```go
    14  package main
    15  
    16  import (
    17  	"time"
    18  
    19  	"gobot.io/x/gobot"
    20  	"gobot.io/x/gobot/platforms/parrot/ardrone"
    21  )
    22  
    23  func main() {
    24  	ardroneAdaptor := ardrone.NewAdaptor("Drone")
    25  	drone := ardrone.NewDriver(ardroneAdaptor, "Drone")
    26  
    27  	work := func() {
    28  		drone.On(drone.Event("flying"), func(data interface{}) {
    29  			gobot.After(3*time.Second, func() {
    30  				drone.Land()
    31  			})
    32  		})
    33  		drone.TakeOff()
    34  	}
    35  
    36  	robot := gobot.NewRobot("drone",
    37  		[]gobot.Connection{ardroneAdaptor},
    38  		[]gobot.Device{drone},
    39  		work,
    40  	)
    41  
    42  	robot.Start()
    43  }
    44  ```
    45  
    46  ## How to Connect
    47  
    48  The ARDrone is a WiFi device, so there is no additional work to establish a connection to a single drone. However, in order to connect to multiple drones, you need to perform some configuration steps on each drone via SSH.