mirror of
https://github.com/hybridgroup/gobot.git
synced 2025-04-26 13:48:49 +08:00
Update README.md
This commit is contained in:
parent
ad0bdeaf8e
commit
3c86b3cd51
@ -28,7 +28,7 @@ func main() {
|
||||
|
||||
spheroAdaptor := new(gobotSphero.SpheroAdaptor)
|
||||
spheroAdaptor.Name = "Sphero"
|
||||
spheroAdaptor.Port = "127.0.0.1:4560"
|
||||
spheroAdaptor.Port = "/dev/rfcomm0"
|
||||
|
||||
sphero := gobotSphero.NewSphero(spheroAdaptor)
|
||||
sphero.Name = "Sphero"
|
||||
@ -42,7 +42,7 @@ func main() {
|
||||
|
||||
work := func() {
|
||||
gobot.Every("2s", func() {
|
||||
sphero.Roll(100, uint16(gobot.Random(0, 360)))
|
||||
sphero.Roll(100, uint16(gobot.Rand(360)))
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user