Changed blink timing. Fixed pin configuration

master
Jared 8 years ago
parent 0b0c720ca0
commit b680ddf512

@ -8,21 +8,21 @@ pin_config = []
def btnBlink(): def btnBlink():
for i in range(3): for i in range(3):
GPIO.output(pin_config['fridge_red_LED'], GPIO.HIGH) GPIO.output(pin_config['fridge_red_LED'], GPIO.HIGH)
time.sleep(0.01) time.sleep(0.02)
GPIO.output(pin_config['fridge_grn_LED'], GPIO.HIGH) GPIO.output(pin_config['fridge_grn_LED'], GPIO.HIGH)
time.sleep(0.01) time.sleep(0.02)
GPIO.output(pin_config['tools_red_LED'], GPIO.HIGH) GPIO.output(pin_config['tools_red_LED'], GPIO.HIGH)
time.sleep(0.01) time.sleep(0.02)
GPIO.output(pin_config['tools_grn_LED'], GPIO.HIGH) GPIO.output(pin_config['tools_grn_LED'], GPIO.HIGH)
time.sleep(0.01) time.sleep(0.02)
GPIO.output(pin_config['fridge_red_LED'], GPIO.LOW) GPIO.output(pin_config['fridge_red_LED'], GPIO.LOW)
time.sleep(0.01) time.sleep(0.02)
GPIO.output(pin_config['fridge_grn_LED'], GPIO.LOW) GPIO.output(pin_config['fridge_grn_LED'], GPIO.LOW)
time.sleep(0.01) time.sleep(0.02)
GPIO.output(pin_config['tools_red_LED'], GPIO.LOW) GPIO.output(pin_config['tools_red_LED'], GPIO.LOW)
time.sleep(0.01) time.sleep(0.02)
GPIO.output(pin_config['tools_grn_LED'], GPIO.LOW) GPIO.output(pin_config['tools_grn_LED'], GPIO.LOW)
time.sleep(0.01) time.sleep(0.02)
if __name__ == '__main__': if __name__ == '__main__':
with open('pin_config.json') as pin_config_stream: with open('pin_config.json') as pin_config_stream:

@ -2,8 +2,8 @@
"mode" : "BCM", "mode" : "BCM",
"fridge_btn" : 14, "fridge_btn" : 14,
"tools_btn" : 15, "tools_btn" : 15,
"fridge_red_LED" : 22, "fridge_red_LED" : 23,
"fridge_grn_LED" : 17, "fridge_grn_LED" : 18,
"tools_red_LED" : 23, "tools_red_LED" : 22,
"tools_grn_LED" : 18 "tools_grn_LED" : 17
} }

Loading…
Cancel
Save