from microbit import * display.off() pin0.write_digital(0) pin13.write_digital(1) pin14.write_digital(1) pin15.write_digital(1) sleep(500) pin13.write_digital(0) pin14.write_digital(0) pin15.write_digital(0) while True: p0 = pin0.read_analog() print("p0: ",p0) if p0 > 100 and p0 < 400: pin13.write_digital(1) else: pin13.write_digital(0) if p0 > 400 and p0 < 700: pin14.write_digital(1) else: pin14.write_digital(0) if p0 > 700: pin15.write_digital(1) else: pin15.write_digital(0) sleep(50)