[Microbit-Python] pullups/pulldowns on pins, in MicroPython on micro:bit

David Whale david at thinkingbinaries.com
Thu Dec 8 05:37:49 EST 2016


Ok thanks. I couldn't find this in the latest docs. I'll take another look,
perhaps I missed it.

On 8 Dec 2016 6:56 am, "Damien George" <damien.p.george at gmail.com> wrote:

> Hi David,
>
> Looking at the code the default pull states seem to be:
>
> read_analog: configured by mbed analogin_init() function, looks like
> there is no pull
> read_digital: PULL_DOWN
> is_touched: PULL_UP
>
> To change the value, use: pin.set_pull(pin.PULL_UP), or PULL_DOWN or
> NO_PULL.
>
> Cheers,
> Damien.
>
>
>
> On 8 December 2016 at 05:06, David Whale <david at thinkingbinaries.com>
> wrote:
> > I remember some discussions about this on github, but I can't find
> anything
> > in the docs about default pullup/down states (and how to change the pull
> > state of the pins) here:
> >
> > https://microbit-micropython.readthedocs.io/en/latest/pin.html
> >
> > Does anyone know
> > (a) what are the default pull configurations for each of the pins in
> each of
> > the following pin modes when using MicroPython (I know what the DAL sets
> > them to, but MicroPython doesn't really use the DAL here I think).
> >
> > read_analog
> > read_digital
> > is_touched
> >
> > (b) How do you change the default pull resistor configuration for each of
> > the pins?
> >
> > Thanks
> >
> > David
> >
> >
> > _______________________________________________
> > Microbit mailing list
> > Microbit at python.org
> > https://mail.python.org/mailman/listinfo/microbit
> >
> _______________________________________________
> Microbit mailing list
> Microbit at python.org
> https://mail.python.org/mailman/listinfo/microbit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/microbit/attachments/20161208/ca1bd47f/attachment.html>


More information about the Microbit mailing list