Quantcast
Viewing all articles
Browse latest Browse all 4854

MicroPython • Re: PULL_UP PULL_DOWN State is back to front?

No, it's not Pin.Pull_UP. You have the button wired between the GPIO and 3.3V. Therefore you want Pin.PULL_DOWN.

In the resting state the button is not pressed, so you want the GPIO pulled to ground (therefore, pull down). The GPIO state reads low.

When you push the button the GPIO is connected to 3.3V, which is stronger than the pull-down, so the GPIO state reads high.

Statistics: Posted by ame — Fri Jan 24, 2025 3:15 am



Viewing all articles
Browse latest Browse all 4854

Trending Articles