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: