Skip to content

Instantly share code, notes, and snippets.

@ledongthuc
Last active December 14, 2015 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ledongthuc/395e304852af31042716 to your computer and use it in GitHub Desktop.
Save ledongthuc/395e304852af31042716 to your computer and use it in GitHub Desktop.
EMBD hello world, blink the buildin light
package main
import (
"time"
"github.com/kidoman/embd"
_ "github.com/kidoman/embd/host/all"
)
func main() {
for {
embd.InitLED()
defer embd.CloseLED()
led, _ := embd.NewLED(0)
led.Toggle()
// Or use `embd.ToggleLED(0)`
time.Sleep(1 * time.Second)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment