[Microbit-Python] Microbit I/O Questions

Damien George damien.p.george at gmail.com
Sun Sep 11 23:24:09 EDT 2016


The microbit GPIO functionality was designed to be easy for children
to use.  So it automatically configures itself to input or output
depending on the call.  Eg pin.write_digital will make it an output,
and pin.read_digital will then make it an input.

Upon power up the pins are in a "disconnected" state, basically in input.

On 10 September 2016 at 00:19, Andrew Ferguson
<andrewferguson500 at gmail.com> wrote:
> During a project I have come across a few questions related to the I/O pins
> of the microbit. I could probably try these myself - but I thought I would
> ask here first before I potentially break my microbit.
>
> Unlike Arduino, there is no way to specify whether a pin is an input or and
> output with the microbit. Therefore I am curious to what would happen in the
> following cases:
>
> A lamp is connected from the 3.3v pin to an I/O pin, and no code is flashed.
> Would the lamp light?
>
> Alternatively, what would happen if a value was read from the pin connected
> to the lamp?
>
> And what would happen if you set an I/O pin to output 3.3v and then tried to
> read from it? Would you get a value? Would the pin become an input and stop
> outputting 3.3v?
>
> _______________________________________________
> Microbit mailing list
> Microbit at python.org
> https://mail.python.org/mailman/listinfo/microbit
>


More information about the Microbit mailing list