daily pastebin goal
3%
SHARE
TWEET

Untitled

a guest Jan 12th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. resetcount = 0 #the loop counter that resets after a certan value
  2. unknowncount = 0 #the unkown entity counter
  3. knowncount = 0 #the known entity counter
  4. somebodyisinpicture = False;
  5.  
  6. RESET_THRESHOLD = 15
  7. KNOWN_THRESHOLD = 5
  8. UNKNOWN_THRESHOLD = 10
  9.  
  10. while True:
  11.    
  12.     if resetcount > RESET_THRESHOLD:
  13.         unknowncount = 0
  14.         knowncount = 0
  15.         resetcount = 0
  16.        
  17.     #cam stuff
  18.     if somebodyisinpicture:
  19.         #add people from picture to array
  20.         #update known and unknowncount
  21.         for name in names:
  22.             if name.known == True:
  23.                 knowncount = knowncount + 1
  24.             else:
  25.                 unknowncount = unknowncount + 1
  26.                
  27.        
  28.         if knowncount > KNOWN_THRESHOLD:
  29.             #light up green LED
  30.         else if unknowncount > UNKNOWN_THRESHOLD:
  31.             #light up red LED
  32.            
  33.     resetcount = resetcount + 1
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top