From 1411e4d7f022f5ab39b832ff6db3367c3b9d790a Mon Sep 17 00:00:00 2001 From: plindborg Date: Tue, 8 Jan 2013 12:08:39 -0800 Subject: [PATCH 1/4] Create README.md --- README.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..b44fa42 --- /dev/null +++ b/README.md @@ -0,0 +1,61 @@ +ardrone +======= + +A Go implementation of the Parrot AR Drone protocols. + + +Get the latest version from Github +go get github.com/felixge/ardrone + +Simple testcode to get the drone to takeof and land: +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 +go build filename. +Then run +./go + From dd88fc7029f006a49c93585d40c2580b90c418db Mon Sep 17 00:00:00 2001 From: plindborg Date: Tue, 8 Jan 2013 21:12:17 +0100 Subject: [PATCH 2/4] Update README.md --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b44fa42..368dfee 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,9 @@ A Go implementation of the Parrot AR Drone protocols. Get the latest version from Github +```bash +npm install git://github.com/felixge/node-ar-drone.git +``` go get github.com/felixge/ardrone Simple testcode to get the drone to takeof and land: @@ -55,7 +58,13 @@ func main() { } Save the code into a file and run -go build filename. +```bash +go build main.go +``` + Then run +```bash ./go +``` + From 32e2ffe5af6f3a63554f2f4a3af2deeda818ae67 Mon Sep 17 00:00:00 2001 From: plindborg Date: Tue, 8 Jan 2013 21:12:47 +0100 Subject: [PATCH 3/4] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 368dfee..43c3ca2 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ A Go implementation of the Parrot AR Drone protocols. Get the latest version from Github ```bash -npm install git://github.com/felixge/node-ar-drone.git -``` go get github.com/felixge/ardrone +``` + Simple testcode to get the drone to takeof and land: package main From df93bc05337731e7bc14ead796320172a87cf266 Mon Sep 17 00:00:00 2001 From: plindborg Date: Tue, 8 Jan 2013 21:15:24 +0100 Subject: [PATCH 4/4] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 43c3ca2..8d82699 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ go get github.com/felixge/ardrone Simple testcode to get the drone to takeof and land: +```js package main import ( @@ -56,7 +57,7 @@ func main() { log.Printf("Land %s\n", time.Since(start)) } - +``` Save the code into a file and run ```bash go build main.go