Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Toggle an LED on pin 13 every 500 ms using TinyGo.
package main
import (
"machine"
"time"
)
func main() {
led := machine.D13
led.Configure(machine.PinConfig{Mode: machine.PinOutput})
for {
led.Toggle()
time.Sleep(500 * time.Millisecond)
}
}TinyGo is a Go compiler designed for small devices, microcontrollers, WebAssembly, and other constrained environments. It enables developers to write Go code that can run efficiently on hardware with limited resources.
Origin & Creator
TinyGo was created by Jonathan Wright and contributors to extend the Go programming language to microcontrollers and WebAssembly in the 2010s.
Industrial Note
TinyGo is niche within embedded systems, IoT development, and WebAssembly applications where full Go runtime is too heavy or memory-limited devices are used.