Categories
Computing

Day 5, Box 3 Part 1 – a bug

For Day 1, go here. The series is tagged advent-2025.

I don’t want to exactly copy the code from the Micropython calendar, because part of the point of Yarg is that it makes using an event-loop style of programming much easier.

For Box 3, two buttons are supplied, and that sounds a lot like my button.ya test code. It’s lightly edited, so that the GPIO lines are the same as ThePiHut suggest:

https://github.com/jhmcaleely/advent-2025/tree/main/box3

Running it today, on 0.2.1, it responds to the first interrupt only, and then halts with a fatal exception. That’s a puzzle, as the test code was working when I made the release!

So I will break out the debugger tomorrow, and see what is going wrong.