Setting pin mode

Questions and discussion about running MicroPython on a micro:bit board.
Target audience: MicroPython users with a micro:bit.
sjdttt
Posts: 2
Joined: Mon Dec 19, 2016 4:27 pm

Setting pin mode

Postby sjdttt » Mon Dec 19, 2016 4:30 pm

I am struggling.... I want to set the pin mode of pin0 to NO_PULL ... does anyone have an example of how to do this.

User avatar
deshipu
Posts: 1036
Joined: Thu May 28, 2015 5:54 pm

Re: Setting pin mode

Postby deshipu » Tue Dec 20, 2016 9:21 am

As far as I know this is not yet possible. There is a pull request about it at https://github.com/bbcmicrobit/micropython/pull/304

sjdttt
Posts: 2
Joined: Mon Dec 19, 2016 4:27 pm

Re: Setting pin mode

Postby sjdttt » Tue Dec 20, 2016 3:51 pm

Thanks....

Changed my circuit to be normally "Pull down" and things now work fine.

Shame as I would really like to be able to change the mode. The pull request is somewhat confusing, (I had tried the commands shown which resulted in Attribute errors.....).


Return to “The micro:bit”

Who is online

Users browsing this forum: No registered users and 1 guest