Proper formatting for README example
This commit is contained in:
parent
3adbd3c905
commit
25535c99e9
|
@ -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)))
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue