8. Digitálny vstup

from microbit import *

while True:
    if pin2.read_digital():
        display.show(Image.HAPPY)
    else:
        display.show(Image.SAD)

http://microbit-micropython.readthedocs.io/en/latest/_images/pinout.pngMicro:bit pinout