github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/examples/blinky1/blinky1.go (about) 1 package main 2 3 // This is the most minimal blinky example and should run almost everywhere. 4 5 import ( 6 "machine" 7 "time" 8 ) 9 10 func main() { 11 led := machine.LED 12 led.Configure(machine.PinConfig{Mode: machine.PinOutput}) 13 for { 14 led.Low() 15 time.Sleep(time.Millisecond * 500) 16 17 led.High() 18 time.Sleep(time.Millisecond * 500) 19 } 20 }