2014-04-11 05:51:31 +02:00
|
|
|
// +build ignore
|
|
|
|
|
|
|
|
// Simple LED blinker, works OOTB on a RPi. However, it does not clean up
|
|
|
|
// after itself. So might leave the LED On. The RPi is not harmed though.
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"github.com/kidoman/embd"
|
2014-04-13 10:32:15 +02:00
|
|
|
_ "github.com/kidoman/embd/host/rpi" // This loads the RPi driver
|
2014-04-11 05:51:31 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
for {
|
2014-04-23 23:33:02 +02:00
|
|
|
embd.LEDToggle("LED0")
|
2014-04-11 05:51:31 +02:00
|
|
|
time.Sleep(250 * time.Millisecond)
|
|
|
|
}
|
|
|
|
}
|