hybridgroup.gobot/platforms/parrot/bebop
deadprogram 2867e6b94b bebop: increase test coverage
Signed-off-by: deadprogram <ron@hybridgroup.com>
2017-04-06 11:08:02 +02:00
..
client Add crude travis check for gofmt; format all sources 2017-03-27 14:10:37 -04:00
LICENSE license: update license year to include 2017 2017-01-02 22:25:17 +01:00
README.md bebop: update README for brief explanation of how to get drone video 2016-12-27 01:16:19 +01:00
bebop_adaptor.go bebop: use new improved default namer to avoid API conflicts 2017-02-02 16:35:26 +01:00
bebop_adaptor_test.go bebop: increase test coverage 2017-04-06 11:08:02 +02:00
bebop_driver.go bebop: use new improved default namer to avoid API conflicts 2017-02-02 16:35:26 +01:00
bebop_driver_test.go bebop: increase test coverage 2017-04-06 11:08:02 +02:00
doc.go docs: correct Bebop README link 2016-12-21 10:54:40 +01:00
pitch.go bebop: add ValidatePitch helper function for Parrot Bebop to package 2017-02-07 11:31:51 +01:00
pitch_test.go bebop: add ValidatePitch helper function for Parrot Bebop to package 2017-02-07 11:31:51 +01:00
test_helper.go Add crude travis check for gofmt; format all sources 2017-03-27 14:10:37 -04:00

README.md

Bebop

The Parrot Bebop and Parrot Bebop 2 are inexpensive quadcopters that can be controlled using their built-in API commands via a WiFi connection. They include a built-in front-facing HD video camera, as well as a second lower resolution bottom-facing video camera.

How to Install

go get -d -u gobot.io/x/gobot/... && go install gobot.io/x/gobot/platforms/parrot/bebop

How to Use

package main

import (
	"time"

	"gobot.io/x/gobot"
	"gobot.io/x/gobot/platforms/parrot/bebop"
)

func main() {
	bebopAdaptor := bebop.NewAdaptor()
	drone := bebop.NewDriver(bebopAdaptor)

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

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

	robot.Start()
}

How to Connect

By default, the Parrot Bebop is a WiFi access point, so there is no additional work to establish a connection to a single drone, you just connect to it.

Once connected, if you want to stream drone video you can either:

- Use the RTP protocol with an external player such as mplayer or VLC.
- Grab the video frames from the drone's data frames, and work with them directly.