Skip to content

Instantly share code, notes, and snippets.

@BenJuan26
Created April 17, 2020 03:10
Show Gist options
  • Save BenJuan26/255131544cec298f874583fefe159cee to your computer and use it in GitHub Desktop.
Save BenJuan26/255131544cec298f874583fefe159cee to your computer and use it in GitHub Desktop.
func main() {
c := &serial.Config{Name: "COM45", Baud: 115200}
s, err := serial.OpenPort(c)
if err != nil {
log.Fatal(err)
}
n, err := s.Write([]byte("test"))
if err != nil {
log.Fatal(err)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment