from machine import Pin
from time import sleep
M1_IN1 = Pin(10, Pin.OUT)
M1_IN2 = Pin(9, Pin.OUT)
SM1 = Pin(21, Pin.OUT)
M2_IN3 = Pin(8, Pin.OUT)
M2_IN4 = Pin(7, Pin.OUT)
SM2 = Pin(22, Pin.OUT)
SM1.value(1)
SM2.value(1)
print("Motors enabled")
while True:
M1_IN1.value(1)
M1_IN2.value(0)
M2_IN3.value(1)
M2_IN4.value(0)
print("Moving forward")
sleep(1)