File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
MEMENTO/Memento_IOT_Doorbell Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -83,19 +83,24 @@ def capture_send_image():
8383 print ("Sent image to IO!" )
8484 else :
8585 print ("ERROR: JPEG frame capture failed!" )
86- print ("DONE, waiting for next press.." )
87- # Turn the LED on to signal that the doorbell is ready to be pressed again
88- led .value = True
8986
9087
9188while True :
9289 # Wait until the doorbell is pressed
9390 if not pin_button .value :
9491 print ("Doorbell pressed!" )
92+
9593 # Turn the doorbell LED off to signal that it has been pressed
9694 led .value = False
95+
9796 # Play a doorbell tone using the speaker
9897 pycam .tone (95 , 0.5 )
9998 pycam .tone (70 , 0.5 )
99+
100100 capture_send_image ()
101+
102+ print ("DONE, waiting for next press.." )
103+
104+ # Turn the LED on to signal that the doorbell is ready to be pressed again
105+ led .value = True
101106 time .sleep (0.01 )
You can’t perform that action at this time.
0 commit comments