Create recover.py
This commit is contained in:
parent
760bb101f9
commit
99f1d7bb9f
22
scripts/recover.py
Normal file
22
scripts/recover.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env python
|
||||
#recover the hardware after a brutal killing
|
||||
|
||||
from adafruit_motor import stepper
|
||||
from adafruit_motorkit import MotorKit
|
||||
from time import sleep
|
||||
import RPi.GPIO as GPIO
|
||||
|
||||
kit = MotorKit()
|
||||
|
||||
stage = kit.stepper1
|
||||
pump_stepper = kit.stepper2
|
||||
|
||||
#release the steppers after killing
|
||||
stage.release()
|
||||
pump_stepper.release()
|
||||
|
||||
#turn off LED after killing
|
||||
GPIO.setmode(GPIO.BCM)
|
||||
GPIO.setwarnings(False)
|
||||
GPIO.setup(21,GPIO.OUT)
|
||||
GPIO.output(21,GPIO.LOW)
|
Loading…
Reference in a new issue