mirror of
https://github.com/kidoman/embd
synced 2024-11-13 21:18:55 +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)
|
|
}
|