Skip to content

Repository files navigation

serial Build StatusGoDoc

Example

package main
import (
"log""github.com/goburrow/serial"
)
funcmain() {
port, err:=serial.Open(&serial.Config{Address: "/dev/ttyUSB0"})
iferr!=nil {
log.Fatal(err)
}
deferport.Close()
_, err=port.Write([]byte("serial"))
iferr!=nil {
log.Fatal(err)
}
}

Testing

Linux and Mac OS

  • socat -d -d pty,raw,echo=0 pty,raw,echo=0
  • on Mac OS, the socat command can be installed using homebrew: brew install socat

Windows

About

Go (golang) serial library for modbus

Resources

Stars

6 stars

Watchers

6 watching

Forks

Releases

Packages

Used by

Contributors

Languages