22 lines
298 B
Go
22 lines
298 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"git.timovolkmann.de/gyrogpsc/core"
|
|
)
|
|
|
|
const (
|
|
SERIAL_PORT = "/dev/tty.usbmodem14201"
|
|
)
|
|
|
|
func main() {
|
|
core.SerialCollector(&printer{}, SERIAL_PORT)
|
|
}
|
|
|
|
type printer struct{}
|
|
|
|
func (p *printer) Process(data *core.Sensordata) error {
|
|
fmt.Println(data)
|
|
return nil
|
|
}
|