Use pull() to configure an internal pull up/down resistor
You typically only enable an internal pull up/down resistor on an input to keep it from floating. Enabling, disabling, or changing the state of a pull up/down resistor using the Pin() constructor will automatically update the PR and PD parameter values and vice-versa. The Pin.pull() method and pull parameter to the Pin() constructor take a single parameter:
- None: disable the internal resistor
- Pin.PULL_DOWN: enable a pull down to ground
- Pin.PULL_UP: enable a pull up to Vcc