Examples do work with Arduino Uno
export GOOS=linux; export GOARCH=arm; export GOFLAGS=-tags=avr,baremetal,linux,arm,atmega328p,atmega,avr5,arduino,tinygo,gc.conservative,scheduler.none; code
tinygo flash --target=arduino cmd/blink-sos/sos.go
tinygo flash --target=arduino cmd/traffic-light/light.go
tinygo flash --target=arduino cmd/traffic-button-light/light.go
tinygo flash --target=arduino cmd/hello-display/main.go
use println("text)
And when the arduino is running do
cat /dev/ttyACM0
avrdude: ser_open(): can't open device "/dev/ttyACM0": Permission denied
Change persmissions of the serial port by using the following command
sudo chmod a+rw /dev/ttyACM0
tinygo build -o ./wasm.wasm -target wasm ./main/main.go
make main
go run server.go