Updated to 1 minute. Added Readme content
This commit is contained in:
parent
1639849bc9
commit
e3cc157af0
2 changed files with 11 additions and 2 deletions
4
DIZZY.py
4
DIZZY.py
|
@ -20,7 +20,7 @@ button = Button(BUTTON_PIN)
|
||||||
# Recording state
|
# Recording state
|
||||||
recording = False
|
recording = False
|
||||||
start_time = None
|
start_time = None
|
||||||
MAX_RECORDING_TIME = 10 # Stop after 1 minute
|
MAX_RECORDING_TIME = 60 # Stop after 1 minute
|
||||||
|
|
||||||
|
|
||||||
def is_usb_mounted():
|
def is_usb_mounted():
|
||||||
|
@ -62,7 +62,7 @@ def main():
|
||||||
while True:
|
while True:
|
||||||
if button.is_pressed:
|
if button.is_pressed:
|
||||||
toggle_video_recording()
|
toggle_video_recording()
|
||||||
time.sleep(10) # Debounce to avoid multiple presses
|
time.sleep(0.1) # Debounce to avoid multiple presses
|
||||||
|
|
||||||
if recording:
|
if recording:
|
||||||
elapsed_time = time.time() - start_time
|
elapsed_time = time.time() - start_time
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
# Babbelbox
|
||||||
|
|
||||||
|
## Install requirements
|
||||||
|
|
||||||
|
``` apt install python-picamers2 ffmpeg ```
|
||||||
|
|
||||||
|
## Improvements
|
||||||
|
|
||||||
|
This code does not show a GUI when recording - This should be added
|
Loading…
Reference in a new issue