Here are some helpful tips to use TinyGo with and an Arduino UNO Q board that is connected either via Android Debug Bridge (adb) or via SSH.
adb is useful for when you want to connect the Arduino UNO Q directly to your computer without a monitor or keyboard.
You can install the adb command line tool for your platform here:
https://developer.android.com/tools/releases/platform-tools
To start a new session, plug the board into your computer using a USB-C cable, then run this command:
tinygo_setup_arduino_q.sh
You must run that command once after plugging in your Arduino after being powered down.
Now you can use the tinygo flash command on your board.
If you want to see the serial output from the microcontroller, you must run the tinygo_monitor_arduino_q.sh command.
To start a new session, plug the board into your computer using a USB-C cable, then run this command:
tinygo_setup_arduino_q.ps1
You must run that command once after plugging in your Arduino after being powered down.
Now you can use the tinygo flash command on your board.
If you want to see the serial output from the microcontroller, you must run the tinygo_monitor_arduino_q.ps1 command.
ssh is useful for when you want to connect to an Arduino UNO Q that is already on a network.
If you haven't set up SSH keys, the script will prompt you for the arduino user's password multiple times (once for every ssh and scp command). To avoid this, set up SSH keys by running ssh-copy-id arduino@<target_ip> on your local machine first.
./tinygo_flash_arduino_uno_q_ssh.sh ./examples/unoqmatrix/ 192.168.1.159
.\tinygo_flash_arduino_uno_q_ssh.ps1 .\examples\unoqmatrix\ 192.168.1.159