1
0
mirror of https://github.com/kidoman/embd synced 2024-06-06 11:07:48 +02:00
embd/samples/gpioshort.go

22 lines
261 B
Go
Raw Normal View History

2014-03-02 08:06:34 +01:00
// +build ignore
package main
import (
"flag"
"github.com/cfreeman/embd"
_ "github.com/cfreeman/embd/host/all"
)
func main() {
flag.Parse()
2014-03-02 20:21:23 +01:00
embd.InitGPIO()
defer embd.CloseGPIO()
2014-03-02 20:21:23 +01:00
embd.SetDirection(10, embd.Out)
embd.DigitalWrite(10, embd.High)
}