I was to create a folder, and then take pictures photos use timestamp to naming, the control of the GPIO pin is for the sake of taking photographs with a flash flash, part of the code (error function) is as follows:
Camera=PiCamera
OS. The mkdir ('/home/PI/Desktop/CZP)
Def picture_cjob () :
Timestart=time. Time ()
Timestop=timestart + 30
While True:
Timenow=time. Time ()
If (timenow & lt; Timestop) :
18, GPIO. The output (GPIO. HIGH)
Camera. The capture ('/home/PI/Desktop/CZP/' + STR (time. Time ()) + 'JPG')
18, GPIO. The output (GPIO. LOW)
Time. Sleep (2)
The else:
Brea
An error image is as follows: