2014-03-23 06:25:32 +05:30
|
|
|
// +build ignore
|
|
|
|
|
2014-03-23 15:47:58 +05:30
|
|
|
// Short LED example, works OOTB on a BBB.
|
|
|
|
|
2014-03-23 06:25:32 +05:30
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2014-04-05 01:43:16 +05:30
|
|
|
"flag"
|
2014-03-23 06:25:32 +05:30
|
|
|
"time"
|
|
|
|
|
|
|
|
"github.com/kidoman/embd"
|
2014-04-06 06:50:09 +05:30
|
|
|
|
2014-04-11 09:10:17 +05:30
|
|
|
_ "github.com/kidoman/embd/host/bbb"
|
2014-03-23 06:25:32 +05:30
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2014-04-05 01:43:16 +05:30
|
|
|
flag.Parse()
|
|
|
|
|
2014-03-23 06:25:32 +05:30
|
|
|
embd.InitLED()
|
|
|
|
defer embd.CloseLED()
|
|
|
|
|
|
|
|
embd.LEDOn(3)
|
|
|
|
time.Sleep(1 * time.Second)
|
|
|
|
embd.LEDOff(3)
|
|
|
|
}
|