For Day 1, go here. The series is tagged advent-2025.
A second post for Day 8. Now that I have Yarg 0.3.0 in hand, I can get box 3 working. Press the red button, see the red LED light. Press the green button, see the green (onboard) LED light.

The code, as before, is in the box3 subdirectory. We need to add the rgbutton.ya file to the standard Yarg image:
$ cp ../yarg-lang-pico-0.3.0/yarg-lang-pico-0.3.0.uf2 box3.uf2
$ hostyarg addfile -fs box3.uf2 -add rgbutton.ya
$ picotool load box3.uf2
That sequence assumes the Pico is waiting as the RPI-RP2 usb drive after booting with bootsel held down.
After flashing completes, reboot the pico (eg with picotool reboot), and at the serial prompt from the Pico:
> import("rgbutton");
We could name the file main.ya to get it to start automatically when the pico reboots.
The code illustrates a key point about Yarg – the hardware driver code is all Yarg, so can be extended at will. In this case, the GPIO library did not include a method (yet!) to setup the pull-up resistors, so I added gpio_set_pulls right in rgbutton.ya.