From 3eda39a3d71d0e28c8d490e68fabed25a6854fbf Mon Sep 17 00:00:00 2001 From: Mike Powell Date: Thu, 9 Aug 2018 07:55:25 +0200 Subject: [PATCH] =?UTF-8?q?'switch.py'=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit add touch 0.jpg to create a empty jpg, to count filename --- switch.py | 1 + 1 file changed, 1 insertion(+) diff --git a/switch.py b/switch.py index cf14093..f97f33b 100644 --- a/switch.py +++ b/switch.py @@ -13,6 +13,7 @@ GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_UP) while True: input_state = GPIO.input(18) if input_state == False: + subprocess.call(["touch","/home/pi/DCIM/0.jpg"]) subprocess.call(["raspistill","-n", "-w", "1251", "-h", "1039", "-vf", "-hf", "-ISO", "200", "-t", "1","-o", "cam.jpg"]) os.system(random.choice(shell_list)) time.sleep(0.2)