Tug of War
A button on PA0 fires an EXTI interrupt on each press (rising edge). The ISR increments a shared counter. After all presses are done, the main loop reads the counter and pulses PA5 that many times (HIGH then LOW for each count).
Example: 3 presses → PA5 sequence [1, 0, 1, 0, 1, 0]
Be careful with how the compiler handles variables shared between interrupt context and the main loop, especially under optimization.