from microbit import *
while True:
display.show(str(pin8.read_digital()))
sleep(100)
pin8.write_digital(1)