firmata: switch to using go-serial package
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
parent
c057909011
commit
ca6f7573ac
2
Makefile
2
Makefile
|
@ -54,7 +54,7 @@ deps:
|
|||
github.com/mgutz/logxi/v1 \
|
||||
github.com/nats-io/nats \
|
||||
github.com/sigurn/crc8 \
|
||||
github.com/tarm/serial \
|
||||
go.bug.st/serial.v1 \
|
||||
github.com/veandco/go-sdl2/sdl \
|
||||
golang.org/x/net/websocket \
|
||||
golang.org/x/sys/unix
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/tarm/serial"
|
||||
serial "go.bug.st/serial.v1"
|
||||
"gobot.io/x/gobot"
|
||||
"gobot.io/x/gobot/drivers/i2c"
|
||||
"gobot.io/x/gobot/platforms/firmata/client"
|
||||
|
@ -54,7 +54,7 @@ func NewAdaptor(args ...interface{}) *Adaptor {
|
|||
conn: nil,
|
||||
board: client.New(),
|
||||
PortOpener: func(port string) (io.ReadWriteCloser, error) {
|
||||
return serial.OpenPort(&serial.Config{Name: port, Baud: 57600})
|
||||
return serial.Open(port, &serial.Mode{BaudRate: 57600})
|
||||
},
|
||||
Eventer: gobot.NewEventer(),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue