mirror of
https://github.com/kidoman/embd
synced 2024-12-23 05:10:05 +01:00
18 lines
201 B
Go
18 lines
201 B
Go
|
// +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)
|
||
|
}
|