diff --git a/main.py b/main.py index 1fe9f09..aa8eef4 100644 --- a/main.py +++ b/main.py @@ -6,11 +6,14 @@ logging.basicConfig( from multiprocessing import Process, Queue from queue import Empty import RPi.GPIO as GPIO +import os import json import requests import serial import time +DEBUG = os.environ.get('DEBUG', False) + RELAY_PIN = 17 RFID_EN_PIN = 27 CARDS_FILE = 'card_data.json' @@ -141,4 +144,4 @@ if __name__ == '__main__': Process(target=reader_thread, args=(card_data,)).start() Process(target=update_thread, args=(card_data,)).start() - Process(target=watchdog_thread).start() + if not DEBUG: Process(target=watchdog_thread).start()