Skip to content

Commit

Permalink
README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
whoisjake committed Aug 30, 2013
1 parent fa2c62c commit 21d56f6
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# gomotion

Gomotion is a framework that uses the [WebSocket](https://en.wikipedia.org/wiki/WebSocket) protocol to communicate with a [LeapMotion](https://www.leapmotion.com/) device.

## Features
* Dead simple to use.
* Frame collection happens concurrently
* JSON comes back parsed and placed into structs for handling.

## To use

In your $GOPATH:

```bash
$ cd $GOPATH
$ go get github.com/whoisjake/gomotion
```

And then: import "github.com/whoisjake/gomotion"

## Example

```go
package main

import (
"github.com/whoisjake/gomotion"
"log"
"runtime"
)

func main() {
// Get a device.
runtime.GOMAXPROCS(runtime.NumCPU())
device := gomotion.GetDevice("ws://127.0.0.1:6437/v3.json")
device.Listen()
defer device.Close()
for frame := range device.Pipe {
log.Printf("%+v\n", frame)
}
}
```

0 comments on commit 21d56f6

Please sign in to comment.