Configure the electrical pull of the specified pin.
Many Calliope mini pins can be configured as pull-ups. For example, a
pull-up can set a pin’s voltage to high (3.3 volts, or 1 when
calling digital read pin). If one
end of a button is connected to P0 (set to high) and the other end
is connected to GND (0 volts), then when you press the button,
P0 is driven to 0 volts, and the Calliope mini software can detect a
button press.
pins.setPull(DigitalPin.P9, PinPullMode.PullDown);
name: The Calliope mini hardware pin to configure (P0-P20)pull: The pull to which to set the pin (down, up, or none)The following example sets the pull of pin P0 to up (high).
pins.setPull(DigitalPin.P0, PinPullMode.PullUp);