mirror of
https://github.com/kidoman/embd
synced 2025-07-03 03:47:33 +02:00
samples: simpleblinker rpi example
does not cleanup up after itself, but is concise
This commit is contained in:
parent
94f99476c2
commit
ad9dea5616
2 changed files with 21 additions and 0 deletions
20
samples/simpleblinker.go
Normal file
20
samples/simpleblinker.go
Normal 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)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue