Fixed spelling

master
Davide Bongiovanni 8 years ago
parent 1cb5200797
commit ab3cab2b56

@ -3,14 +3,14 @@ import RPi.GPIO as GPIO
import keyboard
if __name__ == '__main__':
pin_config = {}
pin_config = []
with open('pin_config.json') as pin_config_stream:
pin_config = json.load(pin_config_stream)
if pin_config['mode'] == 'BOARD':
GPIO.setmode(GPIO.BOARD)
else:
GPIO.setmode(GPIO.BCM)
GPIO.setup(pin_config['frigde_btn'], GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(pin_config['fridge_btn'], GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(pin_config['tools_btn'], GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(pin_config['fridge_red_LED'], GPIO.OUT)
GPIO.setup(pin_config['fridge_grn_LED'], GPIO.OUT)

Loading…
Cancel
Save