Pi Pico. Hey today I was connecting on solderless board with Pico with button and LED making it turn on and off after pressing button. Yesterday it was working properly. Today I accidentally connected button to 3V3_EN instead of 3V3OUT. And LED was blinking although button wasn't pressed! I did reset by connecting RUN and GND. Also I drag&drop nuke flash uf2 and It didn't help. Now I made simple program (code below) that sends info to serial port when button is pressed. I connected pure Pico, nothing is connected to it and it still detects button pressed. What is going on here? What have i broken and how to fix it??? I use Arduino SDK and VS Code.
Is your board working well, if you connect it correctly. Then it is possible that nothing is broken.
I don't know PI Pico, but some boards have resistors that rise pin voltages to HIGH.
Usually, a button at the input needs also resistor on that same input. Then it is possible that an input is always HIGH or LOW without a button or switch.
It is also possible that software connects internal resistors to pins. In general if an input has nothing connected to it, it may read random things or even always HIGH or LOW.
Thank you for help! INPUT_PULLUP didn't work however INPUT_PULLDOWN does it! I'm very newbie at it and completely don't know what means PULLUP or PULLDOWN (Only that it is something with resistors). But the most important is that everything is working!