Setting pin mode

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

Setting pin mode

Post by 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: 1219
Joined: Thu May 28, 2015 5:54 pm

Re: Setting pin mode

Post by 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

Post by 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.....).

Post Reply