1
0
mirror of https://github.com/kidoman/embd synced 2024-12-22 21:00:05 +01:00
embd/samples/ledshort.go
Karan Misra c35deeb17c host specific drivers can now be loaded separately
this ensures cleaner abstractions/code and will ensure that the produced
binary is as small as possible. a convenience package is provided to
easily load all hosts easily: "github.com/kidoman/embd/host/all"
2014-04-06 06:50:09 +05:30

26 lines
302 B
Go

// +build ignore
// Short LED example, works OOTB on a BBB.
package main
import (
"flag"
"time"
"github.com/kidoman/embd"
_ "github.com/kidoman/embd/host/all"
)
func main() {
flag.Parse()
embd.InitLED()
defer embd.CloseLED()
embd.LEDOn(3)
time.Sleep(1 * time.Second)
embd.LEDOff(3)
}