from microbit import * display.off() pin16.write_digital(0) while True: p1 = pin1.read_analog() # prikaz ocitane vrijednosti u kontrolnom prozoru # za otvaranje prozora kliknite ikonu "Repl" print(p1) # vrijednosti if upita prilagodite if p1 < 100: # bijela pin14.write_digital(1) pin15.write_digital(0) pin16.write_digital(0) if p1 > 550: # crna pin16.write_digital(1) pin15.write_digital(0) pin14.write_digital(0) if p1 < 550 and p1 > 100: # zelena pin15.write_digital(1) pin16.write_digital(0) pin14.write_digital(0)