One action per switch press with microcontroller
Here's some simple pseudo code that is not interrupt based and is not debounced.

void main( void ) {
    uint8_t last_state = 0;
    uint8_t btn_state = 0;

    for(;;) {

        btn_state = read_button();

        if( btn_state &amp;&amp; !last_state ) {
            emit_pulse();
        }

        last_state = btn_state;
    }
}