Table of Contents

DESCRIPTION

Flash a Go program that:

PROCESS

Install TinyGo

See the Quick Install.

ChromeOS

Go: Blinky

Blink the LED using the example code:

mkdir blinky
go mod init blinky
package main

import (
	"machine"
	"time"
)

func main() {
	led := machine.LED
	led.Configure(machine.PinConfig{Mode: machine.PinOutput})
	for {
		led.Low()
		time.Sleep(time.Millisecond * 500)

		led.High()
		time.Sleep(time.Millisecond * 500)
	}
}
tinygo build -o /mnt/chromeos/removable/RPI-RP2/firmware.uf2 -target=pico

(markdown)