hybridgroup.gobot/platforms/ardrone
deadprogram c64a0d9481 core: Refactoring to allow 'metal' development using Gobot adaptors/drivers.
Signed-off-by: deadprogram <ron@hybridgroup.com>
2016-09-12 21:33:14 +02:00
..
LICENSE misc: update all LICENSE files for current year 2016-08-27 13:12:47 +02:00
README.md The take-off-before-event-handling bug again 2016-02-17 12:25:14 -08:00
ardrone_adaptor.go Move interface assertions to test files. 2016-07-13 11:04:30 -06:00
ardrone_adaptor_test.go Move interface assertions to test files. 2016-07-13 11:04:30 -06:00
ardrone_driver.go core: Refactoring to allow 'metal' development using Gobot adaptors/drivers. 2016-09-12 21:33:14 +02:00
ardrone_driver_test.go Move interface assertions to test files. 2016-07-13 11:04:30 -06:00
doc.go go lint and documentation tweaks for the ardrone package 2014-12-31 06:34:36 -08:00
test_helper.go Make golint happy 2014-06-10 15:16:11 -07: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

go get -d -u github.com/hybridgroup/gobot/... && go install github.com/hybridgroup/gobot/platforms/ardrone

How to Use

package main

import (
	"time"

	"github.com/hybridgroup/gobot"
	"github.com/hybridgroup/gobot/platforms/ardrone"
)

func main() {
	gbot := gobot.NewGobot()

	ardroneAdaptor := ardrone.NewArdroneAdaptor("Drone")
	drone := ardrone.NewArdroneDriver(ardroneAdaptor, "Drone")

	work := func() {
		gobot.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,
	)
	gbot.AddRobot(robot)

	gbot.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.