Skip to content

Instantly share code, notes, and snippets.

@taiyoh
Last active Jan 2, 2016
Embed
What would you like to do?
package main
import (
"fmt"
"github.com/taiyoh/go-cm160"
)
func main() {
volt := 100
device := cm160.Open()
defer device.Close()
device.Wait(func(rec *cm160.Record) {
// TODO
if rec.IsLive {
rec.CalcWatt(volt)
fmt.Printf("record: %#v\n", rec)
}
})
fmt.Println("exit process")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment