Is this correct? Am I just reading the status incorrectly? (Using the button.py example)
I don’t really like the location of the button so was going to remove it and have one somewhere else anyway. Would just like to check if there’s an actual issue here.
I had a look at the button.py but to be honest can’t figure it out? I will be getting a fan shim at some point, don’t have one to play with at the moment though.
Only other thing I can think of is maybe its not making a good connection on the GPIO pins? Those friction fit shims can be a bit iffy sometimes.
GPIO 3, physical pin 5, is the pin used on a Pi 3B to boot it up. It can also be used to do a proper shutdown with a config.txt edit.
If you do a shut down from Raspbian on a PI 3B+, and leave it powered. Momentarily grounding pin 5 will boot it up. Just a FYI post. ;)
Swapping the pin over to BCM3 works because the button is connected to both BCM3 (for waking from sleep) and BCM17 (for avoiding conflicts with i2c). BCM3, by virtue of being one of the hardware i2c pins on the Pi, has its own onboard pull-up resistor, so it skirts around the fact pull up/down states aren’t being properly set by RPi.GPIO.