[Microbit-Python] I/O pins pull-up/down/float

Damien George damien.p.george at gmail.com
Mon May 16 06:26:43 EDT 2016


It's not exposed in the MicroPython implementation, but we can easily add
it.

It looks to me that the default behaviour for a digital IO pin (ie if you
do pin.read_digital()) is PullDown.

On Sun, May 15, 2016 at 1:01 PM, Nigel Kendrick <nigel.kendrick at gmail.com>
wrote:

> Hi Folks,
>
>
>
> I see that the micro:bit runtime defines a pin mode for the GPIO internal
> pull-ups:
>
>
>
> Int setPull ( PinMode pull)
>
>
>
> Description
>
>
>
> Configures the pull of this pin.
>
> Parameters¶
>
>
>
>     PinMode
>
>     pull - one of the mbed pull configurations: PullUp, PullDown, PullNone
>
>
>
> Returns
>
>
>
> MICROBIT_NOT_SUPPORTED if the current pin configuration is anything other
> than a digital input, otherwise MICROBIT_OK.
>
>
>
> But I don’t see this abstracted to any of the end-user coding environments
> (I may be wrong – be gentle with me as I am still getting up to speed
> here). Is there a default behaviour for I/O pullups/downs/floats or a
> recommended way to handle this with MicroPython on the micro:bit?
>
>
>
> Tldr; I am deciding whether I need external pullups/downs on a board I am
> developing.
>
>
>
> Thanks.
>
>
>
> Nigel Kendrick
>
>
> ------------------------------
> [image: Avast logo] <https://www.avast.com/antivirus>
>
> This email has been checked for viruses by Avast antivirus software.
> www.avast.com <https://www.avast.com/antivirus>
>
>
> _______________________________________________
> 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/20160516/7335c0a1/attachment.html>


More information about the Microbit mailing list