Firmware · GPIO in practice

Reading inputs: pull-ups and floating pins

A button wired to a pin can leave the pin undefined when it isn't pressed, so firmware has to define what the pin reads.