Skip to content

Commit

Permalink
core: update README with an example of 'Metal' Gobot
Browse files Browse the repository at this point in the history
Signed-off-by: deadprogram <[email protected]>
  • Loading branch information
deadprogram committed Sep 12, 2016
1 parent a383f59 commit 67c9cf6
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,33 @@ func main() {
}
```

#### "Metal" Gobot

You can use the entire Gobot framework as shown in the examples above ("Classic" Gobot), or you can pick and choose from the various Gobot packages to control hardware with nothing but pure idiomatic Golang code ("Metal" Gobot). For example:

```go
package main

import (
"github.com/hybridgroup/gobot/platforms/gpio"
"github.com/hybridgroup/gobot/platforms/intel-iot/edison"
"time"
)

func main() {
e := edison.NewEdisonAdaptor("edison")
e.Connect()

led := gpio.NewLedDriver(e, "led", "13")
led.Start()

for {
led.Toggle()
time.Sleep(1000 * time.Millisecond)
}
}
```

## Hardware Support
Gobot has a extensible system for connecting to hardware devices. The following robotics and physical computing platforms are currently supported:

Expand Down

0 comments on commit 67c9cf6

Please sign in to comment.