1
0
mirror of https://github.com/kidoman/embd synced 2024-06-20 02:32:57 +02:00
embd/samples/simpleblinker.go
Karan Misra 94e2ca4ae3 doc: cleanup
also, change the code in simpleblinker.go to match the docs
2014-04-13 14:02:15 +05:30

21 lines
379 B
Go

// +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"
_ "github.com/kidoman/embd/host/rpi" // This loads the RPi driver
)
func main() {
for {
embd.LEDToggle(0)
time.Sleep(250 * time.Millisecond)
}
}