mirror of
https://github.com/kidoman/embd
synced 2024-12-22 04:40:04 +01:00
samples: changes to led
- blink every 250 msec - use Println instead of Printf with \n
This commit is contained in:
parent
e97394e7c2
commit
e73b70b296
@ -39,11 +39,11 @@ func main() {
|
|||||||
|
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-time.After(500 * time.Millisecond):
|
case <-time.After(250 * time.Millisecond):
|
||||||
if err := led.Toggle(); err != nil {
|
if err := led.Toggle(); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
fmt.Printf("Toggled\n")
|
fmt.Println("Toggled")
|
||||||
case <-quit:
|
case <-quit:
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user