1
0
mirror of https://github.com/kidoman/embd synced 2024-12-22 12:50:19 +01:00

gpio: add short analog (bbb) example

This commit is contained in:
Karan Misra 2014-03-23 05:14:25 +05:30
parent 3a072d013b
commit 0ac16b97dd
2 changed files with 18 additions and 0 deletions

1
samples/.gitignore vendored
View File

@ -1,4 +1,5 @@
analog
analogshort
bh1750fvi
bmp085
bmp180

17
samples/analogshort.go Normal file
View File

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