Delete pipeline.py

This commit is contained in:
tpollina 2020-01-15 15:41:35 +01:00 committed by GitHub
parent 78bad3bc5c
commit 5e5c9d8230
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,38 +0,0 @@
#!/usr/bin/env python
from adafruit_motor import stepper
from adafruit_motorkit import MotorKit
from time import sleep
import sys
nb_step = int(sys.argv[1])
orientation = str(sys.argv[2])
#Execute a python cmd with the previous defined variables from php
kit = MotorKit()
stage = kit.stepper1
stage.release()
def focus(steps,orientation):
#0.25mm/step
#31um/microsteps
stage.release()
if orientation == 'up':
for i in range(steps):
stage.onestep(direction=stepper.FORWARD, style=stepper.MICROSTEP)
sleep(0.001)
if orientation == 'down':
for i in range(steps):
stage.onestep(direction=stepper.BACKWARD, style=stepper.MICROSTEP)
sleep(0.001)
stage.release()
focus(nb_step,orientation)