From 3f584454c256c6052908e30a9095b8bfc79be727 Mon Sep 17 00:00:00 2001 From: tpollina Date: Fri, 13 Dec 2019 22:02:00 -0800 Subject: [PATCH] Add files via upload --- scripts/light.py | 4 ++-- scripts/recover.py | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/scripts/light.py b/scripts/light.py index 081d5fa..2669800 100644 --- a/scripts/light.py +++ b/scripts/light.py @@ -18,9 +18,9 @@ state = str(sys.argv[1]) def light(state): - if state == "on": + if state == "true": GPIO.output(21,GPIO.HIGH) - if state == "off": + if state == "false": GPIO.output(21,GPIO.LOW) light(state) diff --git a/scripts/recover.py b/scripts/recover.py index 4464865..ff0b9bc 100644 --- a/scripts/recover.py +++ b/scripts/recover.py @@ -3,8 +3,6 @@ from adafruit_motor import stepper from adafruit_motorkit import MotorKit -from time import sleep -import RPi.GPIO as GPIO kit = MotorKit() @@ -15,8 +13,3 @@ pump_stepper = kit.stepper2 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)