from microbit import *

while True:
    pin14.write_analog(200)
    pin13.write_analog(0)
    pin16.write_analog(200)
    pin15.write_analog(0)
    if button_a.is_pressed():
        pin13.write_analog(200)
        pin14.write_analog(0)
        pin15.write_analog(200)
        pin16.write_analog(0)
        sleep(200)
        pin14.write_analog(0)
        pin13.write_analog(300)
        pin16.write_analog(300)
        pin15.write_analog(0)
        sleep(200)
    elif button_b.is_pressed():
        pin13.write_analog(200)
        pin14.write_analog(0)
        pin15.write_analog(200)
        pin16.write_analog(0)
        sleep(200)
        pin13.write_analog(0)
        pin14.write_analog(300)
        pin16.write_analog(0)
        pin15.write_analog(300)
        sleep(200)
