Translations:Dimensionner et faire un tracker solaire photovolatïque low tech/208/en

def forward(wait):

   GPIO.setmode(GPIO.BCM)
   GPIO.setup(16,GPIO.OUT) #motor1
   GPIO.setup(23,GPIO.OUT) #motor1
   GPIO.setup(20,GPIO.OUT) #enable
   GPIO.setup(21,GPIO.OUT) #enable
   GPIO.setup(1,GPIO.OUT)  #motor2
   GPIO.setup(7,GPIO.OUT)  #motor2
   try:
       print("forward")
       GPIO.output(1,GPIO.HIGH)
       GPIO.output(7,GPIO.LOW)
       GPIO.output(21,GPIO.HIGH)
       GPIO.output(20,GPIO.LOW)
       GPIO.output(23,GPIO.LOW)
       GPIO.output(16,GPIO.LOW)
       for k in range(wait):
           print(k)
           time.sleep(1)
       GPIO.output(1,GPIO.LOW)
       GPIO.output(21,GPIO.LOW)
   except KeyboardInterrupt:
       print("keyboard interrupt")
   except Exception as err:
       print(err)
   finally:
       print("zero")
       GPIO.output(1,GPIO.LOW)
       GPIO.output(7,GPIO.LOW)
       GPIO.output(20,GPIO.LOW)
       GPIO.output(21,GPIO.LOW)
       GPIO.output(23,GPIO.LOW)
       GPIO.output(16,GPIO.LOW)
       #GPIO.cleanup() on my sbc it doesnt remove the +3V

def backward(wait):

   GPIO.setmode(GPIO.BCM)
   GPIO.setup(20,GPIO.OUT) #enable
   GPIO.setup(21,GPIO.OUT) #enable
   GPIO.setup(1,GPIO.OUT)  #motor2
   GPIO.setup(7,GPIO.OUT)  #motor2
   GPIO.setup(16,GPIO.OUT) #motor1
   GPIO.setup(23,GPIO.OUT) #motor1
   try:
       print("backward")
       GPIO.output(21,GPIO.HIGH)
       GPIO.output(20,GPIO.LOW)
       GPIO.output(16,GPIO.LOW)
       GPIO.output(23,GPIO.LOW)
       GPIO.output(7,GPIO.HIGH)
       GPIO.output(1,GPIO.LOW)
       for k in range(wait):
           print(k)
           time.sleep(1)
       GPIO.output(7,GPIO.LOW)
       GPIO.output(21,GPIO.HIGH)
   except KeyboardInterrupt:
       print("keyboardinterrupt")
   except Exception as err:
       print(err)
   finally:
       print("zero")
       GPIO.output(20,GPIO.LOW)
       GPIO.output(21,GPIO.LOW)
       GPIO.output(16,GPIO.LOW)
       GPIO.output(23,GPIO.LOW)
       GPIO.output(1,GPIO.LOW)
       GPIO.output(7,GPIO.LOW)
       #GPIO.cleanup() on my sbc it doesnt remove the +3V

forward(2) #rotation horary motor2 backward(2) #rotation antihorary motor2 forwardzero(10) #hydraulic cylinder extension motor1 111 max backwardzero(10) #hydraulic cylinder retractation motor1 107 max