You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
295 B
21 lines
295 B
7 years ago
|
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)
|
||
|
}
|