import machine, time p26 = machine.Pin(26) in1 = machine.PWM(p26) p27 = machine.Pin(27) in2 = machine.PWM(p27) while True: in1.freq(500) in1.duty_u16(60000) in2.freq(500) in2.duty_u16(0) print("fwd") time.sleep(2) in2.freq(500) in2.duty_u16(60000) in1.freq(500) in1.duty_u16(0) print("rev") time.sleep(2)