mirror of
https://gitlab.com/imvec/picapikap.git
synced 2025-12-11 16:49:57 +01:00
12 lines
256 B
Python
12 lines
256 B
Python
from gpiozero import Button
|
|
from subprocess import check_call
|
|
from signal import pause
|
|
|
|
def disparo():
|
|
check_call(['python3', '/home/pi/PicaPiKAP/scripts/PicaPiKAP.py'])
|
|
|
|
shutdown_btn = Button(27, hold_time=2)
|
|
shutdown_btn.when_held = disparo
|
|
|
|
pause()
|