1
0
mirror of https://github.com/kidoman/embd synced 2024-12-22 04:40:04 +01:00

samples: simpleblinker rpi example

does not cleanup up after itself, but is concise
This commit is contained in:
Karan Misra 2014-04-11 09:21:31 +05:30
parent 94f99476c2
commit ad9dea5616
2 changed files with 21 additions and 0 deletions

1
samples/.gitignore vendored
View File

@ -17,6 +17,7 @@ pwm
servo
servobbb
servoblaster
simpleblinker
tmp006
us020
watersensor

20
samples/simpleblinker.go Normal file
View File

@ -0,0 +1,20 @@
// +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"
)
func main() {
for {
embd.LEDToggle(0)
time.Sleep(250 * time.Millisecond)
}
}