Skip to content

Commit

Permalink
Merge pull request #1 from plindborg/master
Browse files Browse the repository at this point in the history
Added getting started info into Readme.md
  • Loading branch information
felixge committed Jan 15, 2013
2 parents 756a34e + df93bc0 commit 6cd67e2
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions README.md
@@ -0,0 +1,71 @@
ardrone
=======

A Go implementation of the Parrot AR Drone protocols.


Get the latest version from Github
```bash
go get github.com/felixge/ardrone
```


Simple testcode to get the drone to takeof and land:
```js
package main

import (
"log"
"github.com/felixge/ardrone"
/*"net"*/
"time"
)

func main() {
log.SetFlags(log.Lmicroseconds)
client := &ardrone.Client{Config: ardrone.DefaultConfig()}

start := time.Now()

log.Printf("Connecting to: %+v ...\n", client)

err := client.Connect()
if err != nil {
log.Fatal(err)
return
}

log.Printf("Ready! Took %s\n", time.Since(start))

start = time.Now()

err = client.Takeoff()
if err != nil {
log.Fatal(err)
return
}

log.Printf("Takeoff %s\n", time.Since(start))

start = time.Now()

err = client.Land()
if err != nil {
log.Fatal(err)
return
}

log.Printf("Land %s\n", time.Since(start))
}
```
Save the code into a file and run
```bash
go build main.go
```

Then run
```bash
./go
```


0 comments on commit 6cd67e2

Please sign in to comment.