text: import time
  import RPi.GPIO as GPIO
  
  
  def setStep(w1, w2, w3, w4):
      from .config import IN1, IN2, IN3, IN4
      GPIO.output(IN1, w1)
      GPIO.output(IN2, w2)
      GPIO.output(IN3, w3)
      GPIO.output(IN4, w4)
  
  
  def stop():
      print('电机stop')
      setStep(0, 0, 0, 0)
  
  
  def forward(delay, steps):
      print('电机forward')
      for i in range(0, steps):
          setStep(1, 0, 0, 0)
          time.sleep(delay)
          setStep(0, 1, 0, 0)
          time.sleep(delay)
          setStep(0, 0, 1, 0)
          time.sleep(delay)
          setStep(0, 0, 0, 1)
          time.sleep(delay)
  
  
  def backward(delay, steps):
      print('电机backward')
      for i in range(0, steps):
          setStep(0, 0, 0, 1)
          time.sleep(delay)
          setStep(0, 0, 1, 0)
          time.sleep(delay)
          setStep(0, 1, 0, 0)
          time.sleep(delay)
          setStep(1, 0, 0, 0)
          time.sleep(delay)
  