tbm-go-rots/protocol/main.go

21 lines
295 B
Go
Raw Normal View History

2017-07-25 12:30:51 +02:00
package main
import (
"log"
)
func main() {
t := &TBM{}
err := t.Connect("/dev/ttyUSB0")
if err != nil {
log.Fatal(err)
}
t.Handle()
defer t.Close()
//cmd := &Command{"Hi", []string{"v20170802 testing"}}
//t.Commands <- cmd
res := <-t.Results
log.Printf("Got result: %q", res)
}