I was thinking something with a 555 timer IC. Beginner friendly, and not expensive. Googling around it seems that might not work without a bit more, and there are other ICs. However, while searching I found this simple example using a capacitor, which might be just the thing!
Schematic copied here:
Now this was intended to condition the signal for a 555, but you won’t need a 555 (or anything to the right of it) since we don’t need to extend the duration of a very small pulse, and can focus on just the R1, R3, C3, and S1 part.
What is happening here is that the capacitor only lets the button pull down the signal until the capacitor charges up (through R1, and the button S1), at which point it blocks further current flow and R1 holds the input high. When the button is released, the capacitor is pulled up on both sides and discharges, ready for the next press after some time.
To adapt this to Pixelblaze, you need to keep in mind the pull-up on the input (R1) is already there in Pixelblaze. You’ll only need C3 and R3, and your button for S1. You need to find a suitable capacitor that will take long enough to charge to register a pulse, but not so large that it allows the 5 second hold action. If you have a polarized capacitor (one where the + and - matter), face the + towards the GPIO on Pixelblaze and the - side to your button. Next, find a resistor for R1 that re-arms the circuit by discharging the capacitor quickly enough for the button to be usable. Too high of a resistance would mean you have to wait a long time.
I’m ballparking here, using the RC time constant formula
T = RC where
T is seconds
R is ohms and
C is in farads.
If I recall, the pull-ups for the GPIO are something around 30k-50k. I think a capacitor around 4.7uF would work giving a max pulse at least 100ms or so. Anything around 1k-10k should work for R3 if it’s around 4.7uF, discharging it pretty quickly.