示例#1
0
#t1 = Thread(target = run_cam)
#t1.start()

name = [l for l in string.ascii_uppercase]

pic_or_gif = "pic"

while True:

    score = 0
    now = datetime.now()
    time_taken = time()

    try:
        sound = aud.R(bark_time)
    except Exception as e:
        print(e)
        aud = Audio()

    img, per = run_cam()

    if per > 75:

        print("Too dark")
        #f = open(path + "/last_run.txt","w")
        #time_id = '{:02d}'.format(now.day)+"-"+'{:02d}'.format(now.month)+"-"+str(now.year)+"-"+'{:02d}'.format(now.hour)+":"+'{:02d}'.format(now.minute)+":"+'{:02d}'.format(now.second)
        #f.write("Closed because too dark at: " + time_id+"\n")
        #f.close()
        #break
        sleep(3600)