from microbit import *


while True:
    if pin12.read_digital() == 1:
        pin14.write_analog(250)
        pin13.write_analog(0)
        pin16.write_analog(0)
        pin15.write_analog(250)
    elif pin8.read_digital() == 1:
        pin14.write_analog(0)
        pin13.write_analog(250)
        pin16.write_analog(250)
        pin15.write_analog(0)
    else:
        pin14.write_analog(300)
        pin13.write_analog(0)
        pin16.write_analog(300)
        pin15.write_analog(0)
