from machine import Pin
from utime import sleep
step=Pin(18,Pin.OUT)
dir_mtr=Pin(17,Pin.OUT)

def move(count,direction):
    dir_mtr.value(direction)
    for i in range(count):
        step.value(0)
        sleep(0.05)
        step.value(1)
        sleep(0.05)

sleep(2)
while 1:
    move(200,1)
    move(200,0)
    

BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT
A4988