"What is the purpose of a pull-up or pull-down resistor on an MCU input pin, and what can go wrong if the input is left floating?"