• Sorry just read the title - this is on a Pico?

    To detect a button press, you probably want edge:'rising'?

    Are you using an up to date firmware? I know some earlier ones had issues with debouncing.

    Also, is that the only code you're running? Could be be that the pin state on BTN (which is actually pin C13) could be being reset to a pure input somehow? By default it is in input_pulldown mode, which uses an internal resistor to stop it floating when the button isn't pressed.

About

Avatar for Gordon @Gordon started