Proper formatting for README example

This commit is contained in:
deadprogram 2013-11-13 20:50:22 -08:00
parent 3adbd3c905
commit 25535c99e9
1 changed files with 10 additions and 9 deletions

View File

@ -17,6 +17,7 @@ Then install additional libraries for whatever hardware support you want to use
```go
package main
import (
"github.com/hybridgroup/gobot"
"github.com/hybridgroup/gobot-sphero"
@ -31,15 +32,15 @@ func main() {
sphero := gobotSphero.NewSphero(spheroAdaptor)
sphero.Name = "Sphero"
connections := []interface{} {
connections := []interface{}{
spheroAdaptor,
}
devices := []interface{} {
devices := []interface{}{
sphero,
}
work := func(){
gobot.Every("2s", func(){
work := func() {
gobot.Every("2s", func() {
sphero.Roll(100, uint16(gobot.Random(0, 360)))
})
}