Raspberry Pi camera. Out of resources
问题 Trying to launch my camera with motion sensor. Works fine like this: import RPi.GPIO as GPIO import time import picamera import datetime import os def getFileName(): return datetime.datetime.now().strftime("%Y-%m-%d_%H.%M.%S.h264") pin = 4 GPIO.setmode(GPIO.BCM) GPIO.setup(pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) prevState = False currState = False camera = picamera.PiCamera() while True: time.sleep(0.1) prevState = currState currState = GPIO.input(pin) if currState != prevState: newState =