linted clean, changed exit/enter varnames
@@ -31,8 +31,8 @@ prev_door = False
pygame.mixer.init(44100, -16, 2, 1024)
# sound files expect to be in the same directory as script
-enter = pygame.mixer.Sound("./enter.wav")
-exit = pygame.mixer.Sound("./exit.wav")
+enter_sound = pygame.mixer.Sound("./enter.wav")
+exit_sound = pygame.mixer.Sound("./exit.wav")
while True:
@@ -53,10 +53,9 @@ while True:
# If not, someone is exiting.
if door.value and not prev_door:
if motion.value:
- enter.play()
+ enter_sound.play()
else:
- exit.play()
+ exit_sound.play()
prev_door = door.value
-
time.sleep(0.01)
