github.com/aykevl/tinygo@v0.5.0/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.GPIO{machine.LED} 12 led.Configure(machine.GPIOConfig{Mode: machine.GPIO_OUTPUT}) 13 for { 14 led.Low() 15 time.Sleep(time.Millisecond * 500) 16 17 led.High() 18 time.Sleep(time.Millisecond * 500) 19 } 20 }