from machine import Pin
from utime import sleep
dir_m=Pin(18,Pin.OUT)
step=Pin(19,Pin.OUT)
def stepper_move(cnt,direction):
dir_m.value(direction)
for i in range(cnt):
step.value(0)
sleep(0.1)
step.value(1)
sleep(0.1)
step.value(0)
sleep(0.1)
stepper_move(10,1)
stepper_move(10,0)