How to disable pull down resistor in DigitalIn?

02 Jun 2011

I know the pull down resistor is always there when use digitalin function. How do i disable it. On a side note, does anyone know what's the resistor value that the mbed use for pull down (1M?)?

02 Jun 2011

Hi Kevin,

You can use the mode() method:

#include "mbed.h"

DigitalIn x(p5);

int main() {
    x.mode(PullNone);
}

See http://mbed.org/handbook/DigitalIn

Simon

02 Jun 2011

Thanks so much!