hybridgroup.gobot/platforms/parrot/ardrone
Thomas Kohler f5d8d5c601
all(style) : fix linter issues for errcheck, ineffassign, unused and fix errors (#950)
2023-06-12 19:51:25 +02:00
..
LICENSE Build(v2): revert move to v2 subfolder (#932) 2023-05-29 19:23:28 +02:00
README.md core(build): CLI removed (#946) 2023-06-04 18:36:55 +02:00
ardrone_adaptor.go Build(v2): revert move to v2 subfolder (#932) 2023-05-29 19:23:28 +02:00
ardrone_adaptor_test.go Build(v2): revert move to v2 subfolder (#932) 2023-05-29 19:23:28 +02:00
ardrone_driver.go Build(v2): revert move to v2 subfolder (#932) 2023-05-29 19:23:28 +02:00
ardrone_driver_test.go all(style) : fix linter issues for errcheck, ineffassign, unused and fix errors (#950) 2023-06-12 19:51:25 +02:00
doc.go core(build): CLI removed (#946) 2023-06-04 18:36:55 +02:00
pitch.go Build(v2): revert move to v2 subfolder (#932) 2023-05-29 19:23:28 +02:00
pitch_test.go Build(v2): revert move to v2 subfolder (#932) 2023-05-29 19:23:28 +02:00
test_helper.go Build(v2): revert move to v2 subfolder (#932) 2023-05-29 19:23:28 +02:00

README.md

Ardrone

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.

For more info about the ARDrone platform click here.

How to Install

Please refer to the main README.md

How to Use

package main

import (
  "time"

  "gobot.io/x/gobot/v2"
  "gobot.io/x/gobot/v2/platforms/parrot/ardrone"
)

func main() {
  ardroneAdaptor := ardrone.NewAdaptor("Drone")
  drone := ardrone.NewDriver(ardroneAdaptor, "Drone")

  work := func() {
    drone.On(drone.Event("flying"), func(data interface{}) {
      gobot.After(3*time.Second, func() {
        drone.Land()
      })
    })
    drone.TakeOff()
  }

  robot := gobot.NewRobot("drone",
    []gobot.Connection{ardroneAdaptor},
    []gobot.Device{drone},
    work,
  )

  robot.Start()
}

How to Connect

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.