1
0
mirror of https://github.com/kidoman/embd synced 2024-06-15 07:10:02 +02:00
embd/samples/analogshort.go
Kunal Powar 779096e668 samples: enable flag parsing
this will allow people to use glog options (like -v=3) to increase
verbosity of the log output
2014-04-05 01:43:16 +05:30

21 lines
224 B
Go

// +build ignore
package main
import (
"flag"
"fmt"
"github.com/kidoman/embd"
)
func main() {
flag.Parse()
embd.InitGPIO()
defer embd.CloseGPIO()
val, _ := embd.AnalogRead(0)
fmt.Printf("Reading: %v\n", val)
}