1
0
mirror of https://github.com/kidoman/embd synced 2025-01-08 20:54:27 +01:00
embd/samples/analogshort.go

21 lines
224 B
Go
Raw Normal View History

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