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