Debian Codegraph @

README.md

raw symbols SCIP
1 # serial [![Build Status](https://travis-ci.org/goburrow/serial.svg?branch=master)](https://travis-ci.org/goburrow/serial) [![GoDoc](https://godoc.org/github.com/goburrow/serial?status.svg)](https://godoc.org/github.com/goburrow/serial)
2 ## Example
3 ```go
4 package main
5
6 import (
7 "log"
8
9 "github.com/goburrow/serial"
10 )
11
12 func main() {
13 port, err := serial.Open(&serial.Config{Address: "/dev/ttyUSB0"})
14 if err != nil {
15 log.Fatal(err)
16 }
17 defer port.Close()
18
19 _, err = port.Write([]byte("serial"))
20 if err != nil {
21 log.Fatal(err)
22 }
23 }
24 ```
25 ## Testing
26
27 ### Linux and Mac OS
28 - `socat -d -d pty,raw,echo=0 pty,raw,echo=0`
29 - on Mac OS, the socat command can be installed using homebrew:
30 ````brew install socat````
31
32 ### Windows
33 - [Null-modem emulator](http://com0com.sourceforge.net/)
34 - [Terminal](https://sites.google.com/site/terminalbpp/)