Skip to content

Commit

Permalink
Fix broken examples
Browse files Browse the repository at this point in the history
  • Loading branch information
zankich committed Jun 6, 2014
1 parent 30b92ac commit 6f14570
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/beaglebone_led_brightness.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func main() {
brightness := uint8(0)
fade_amount := uint8(5)

gobot.Every(0.1*time.Second, func() {
gobot.Every(100*time.Millisecond, func() {
led.Brightness(brightness)
brightness = brightness + fade_amount
if brightness == 0 || brightness == 255 {
Expand Down
2 changes: 1 addition & 1 deletion examples/firmata_cat_toy.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"fmt"
"github.com/hybridgroup/gobot"
"github.com/hybridgroup/gobot/platforms/gpio"
"github.com/hybridgroup/gobot/platforms/firmata"
"github.com/hybridgroup/gobot/platforms/gpio"
"github.com/hybridgroup/gobot/platforms/leap"
"time"
)
Expand Down
4 changes: 2 additions & 2 deletions examples/neurosky.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ func main() {
})
}

gbot.Robots := append(gbot.Robots,
gobot.NewRobot("brainBot",[]gobot.Connection{adaptor},[]gobot.Device{neuro},work))
gbot.Robots = append(gbot.Robots,
gobot.NewRobot("brainBot", []gobot.Connection{adaptor}, []gobot.Device{neuro}, work))

gbot.Start()
}
2 changes: 1 addition & 1 deletion examples/opencv_window.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ func main() {
gbot.Robots = append(gbot.Robots,
gobot.NewRobot("cameraBot", []gobot.Connection{}, []gobot.Device{window, camera}, work))

gbot.Start()}
gbot.Start()
}
3 changes: 2 additions & 1 deletion examples/sphero_api.go
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/hybridgroup/gobot/platforms/sphero"
)

Master := gobot.NewGobot()
var Master gobot.Gobot

func TurnBlue(params map[string]interface{}) bool {
spheroDriver := Master.FindRobotDevice(params["robotname"].(string), "sphero")
Expand All @@ -15,6 +15,7 @@ func TurnBlue(params map[string]interface{}) bool {
}

func main() {
Master = gobot.NewGobot()
api.Api(Master).Start()

spheros := map[string]string{
Expand Down
2 changes: 1 addition & 1 deletion examples/sphero_master.go
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func main() {
}

master.Robots = append(master.Robots, gobot.NewRobot(
""
"",
nil,
nil,
func() {
Expand Down

0 comments on commit 6f14570

Please sign in to comment.