mirror of
https://github.com/kidoman/embd
synced 2024-12-22 21:00:05 +01:00
c35deeb17c
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"
26 lines
302 B
Go
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)
|
|
}
|