if GPIO.input(4): logging.debug ("Event: RISING!") else: logging.debug ("Event: FALLING!") # ------------------------------------------------------------------------------------------------- # Setup # ------------------------------------------------------------------------------------------------- print os.path.dirname(os.path.realpath(__file__)) # Read configuration file inifile.read(os.path.dirname(os.path.realpath(__file__)) + "/raspberry-pi-pircam-xlight.ini") # Debug readok = "True" == inifile.get_ini("Debug", "readok", False) debug = "True" == inifile.get_ini("Debug", "debug", False) # Filesystem filepath = inifile.get_ini("Filesystem", "filepath", "/var/www") filenamePrefix = inifile.get_ini("Filesystem", "filenamePrefix", "PIR") diskSpaceToReserve = int(inifile.get_ini("Filesystem", "diskSpaceToReserve", 1048576)) # 1024 * 1024 * 1024 - Keep 1024 mb free on disk # Light # True / False - Ir light in use bIrLight = "True" == inifile.get_ini("Light", "IrLight", False) # Camera # True / False - Camera led bLedOn = "True" == inifile.get_ini("Camera", "LedOn", False) bVidPic = "True" == inifile.get_ini("Camera", "VideoPicture", False)