A common button module circuit, as shown below
When R1 is less than 4kΩ, IO can normally detect high level, but when resistance R1 is greater than 4KΩ, IO can only detect low level.I tried to set IO to pull up, and it was the same.
1.Which settings of the IO port I have overlooked, causing the external pull-up resistance to be no greater than 4KΩ?
(Many sensor modules have a pull-up resistance greater than 4kΩ. If the solution is to reduce the pull-up resistance, it will not be compatible with sensor modules such as Raspberry Pi Sensor Module, Arduino Sensor Module, etc.)