mirror of
https://github.com/hybridgroup/gobot.git
synced 2025-04-27 13:48:56 +08:00
sphero: switch to using go-serial package
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
parent
5a810f9e7f
commit
5d75bac746
@ -5,7 +5,7 @@ import (
|
||||
|
||||
"gobot.io/x/gobot"
|
||||
|
||||
"github.com/tarm/serial"
|
||||
serial "go.bug.st/serial.v1"
|
||||
)
|
||||
|
||||
// Adaptor represents a Connection to a Sphero
|
||||
@ -23,7 +23,7 @@ func NewAdaptor(port string) *Adaptor {
|
||||
name: gobot.DefaultName("Sphero"),
|
||||
port: port,
|
||||
connect: func(port string) (io.ReadWriteCloser, error) {
|
||||
return serial.OpenPort(&serial.Config{Name: port, Baud: 115200})
|
||||
return serial.Open(port, &serial.Mode{BaudRate: 115200})
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user